We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

One botton to switch between texture/material

Home Forums Puzzles One botton to switch between texture/material

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #14475
    Kani
    Participant

    Hi,

    I tried this so much and was unsuccessful.Is there a way that we can configure puzzle so when we click the botton once material/ texture change and when we click the same botton texture change to previous material?

    #14476

    Hi. You need to create a viriable (for example with name Material=1) then when you click on the button do the check If Material=1 then do: Assign new Material/Texture; Material=2; Else if Material=2 then do Assign previous Material/Texture; Materil=1

    Co-founder and lead graphics specialist at Soft8Soft.

    #14516
    Kani
    Participant

    Sorry Maybe I was not very clear with the question

    I want to switch between two textures with the use of same button. One of the textures are already applied to the model from the start and other one is saved in the folder, Do you have an example for the variable for texture application?

    If possible this is a huge technical help for me

    #14517
    patrickbelt
    Customer

    Hi Kani,

    I’m just a Verge3D user like yourself, but I also had a need to change the texture of a object with a single button like you are describing. See the attached image to the set up that I came up with.

    Note: There are two “when clicked” actions for the same button. The first “when clicked” action changes the texture on the object (in my case the color of an airplane), and the second “when clicked” action changes the texture used on the button itself. In my case the button changes from saying Texture 1, to saying Texture 2 – then switches back to Texture 1 if clicked again, and so forth. This second action is entirely optional. I hope it’s not too confusing, but it works for me. – Patrick

    patrick.c.belt@gmail.com

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.