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.

Q: toggle button and animation loop check

Home Forums Programming Q: toggle button and animation loop check

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #27109
    robwu01
    Participant

    Hi all,

    Just started looking into Verge3D in combination with Blender.

    As as exercise to get familiar with the setup of Verge3D, I’m converting an old project from Unity over to Blender + Verge.
    The conversion to Blender was easy, and I have the CAD file now in Verge as well.

    OK, so here’s my two questions, any tips where to look are appreciated.

    First one:
    I would like to have the ability to toggle a button to e.g. hide/unhide a object combo. So hide object A on a button click and show object B, and on re-click the opposite. I already saw you can hide objects on startup.
    The same for material combo’s. Click the button once, and there’s another material. Click again and revert back to the old one.
    Have looked at the puzzles, but not sure what to pick atm… Some sort of array?

    Second one (sorry if this is better a second post..):
    I have -say- 3 animations on the object, and I would like to have the following functionality…
    I click on the first menu button and start animation A, now I click on the second menu button for animation 2.
    Before animation 2 is played, I would like to have a check to see if another animation (in this case A) has run, reverse animation A first to the start state, and -then- start animation 2.
    And the same for the third menu button and animation 3.

    So every button should check if any of the other animations has run, and first run the inverse animation, before starting the animation corresponding with the button click.

    Hope someone can point me in the right direction, examples or documentation.
    I love the ability to move directly from Blender to Verge, it’s so intuitive to do.

    cheers!

    rob
    holland

    Below sea level: 52.213545 Lat, 4.422061 Long

    #27145

    I would like to have the ability to toggle a button to e.g. hide/unhide a object combo. So hide object A on a button click and show object B, and on re-click the opposite. I already saw you can hide objects on startup.
    The same for material combo’s. Click the button once, and there’s another material. Click again and revert back to the old one.
    Have looked at the puzzles, but not sure what to pick atm… Some sort of array?

    exactly this use case is covered in our tutorial

    3 animations on the object, and I would like to have the following functionality

    you can detect if animation is finished, and play animation in reverse with puzzles
    https://www.soft8soft.com/docs/manual/en/puzzles/Animation.html

    Chief 3D Verger | LinkedIn | Twitter

    #27146
    robwu01
    Participant

    Thanks!
    Will have a look and see if I can get it to work ;)

    I posted another question on the fullscreen button yesterday, but the post is gone on the forum. But I get an error message if I look at my posts.
    Is there something I did wrong? I tried to edit it due to some grammar errors, and after that it was gone…

    Below sea level: 52.213545 Lat, 4.422061 Long

    #27173

    sorry that post was hidden by the antispam plugin – restored and answered it!

    Chief 3D Verger | LinkedIn | Twitter

    #27212
    robwu01
    Participant

    Thanks for both answers :)

    I solved my toggle buttons with the help of the animation series, and added some code so I can also ‘reset’ materials in-between other buttons.

    I love the blender-verge combo, I can see it already saving so much time not having to redo a lot of things in Unity. Not to mention the ease of programming things.

    cheers!
    rob

    Below sea level: 52.213545 Lat, 4.422061 Long

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