Hide and show objects from one button
13 October 2015 08:35
Sorry for the 1000 questions but keen to get something working :)
Ok my question (well it's probably 2 questions) is, can you have one button that when pressed hides a group of objects, but when it's pressed again reveals that group of objects again?
I have a Entry Point node joined to a Select node which is then joined to a Hide node but wasn't sure if I then join a Show node to if from the Next socket?
Hope that makes sense.
Ok my question (well it's probably 2 questions) is, can you have one button that when pressed hides a group of objects, but when it's pressed again reveals that group of objects again?
I have a Entry Point node joined to a Select node which is then joined to a Hide node but wasn't sure if I then join a Show node to if from the Next socket?
Hope that makes sense.
13 October 2015 17:43
Unfortunately, we do not support handling object groups in the logic editor yet. As a workaround, you can parent all your objects and animate the parent to a far position. Another option is to link a group from another file and animate its instance (please see the attached example).
example.zip
main.html
example.zip
main.html
Manager and 3D Generalist at Blend4Web
No pain, no gain.
mikhail@blend4web.com
No pain, no gain.
mikhail@blend4web.com
14 October 2015 04:28
Thanks for that Mikhail,
ok I gave it a go. But it seems when I have two buttons (red and green), where red should hide and reveal the redCube (but also reveal the greenCube if it was hidden) and where green should hide and reveal the greenCube (but also reveal the redCube if it was hidden) is a bit buggy.
eg if you select the green button (which hides the greenCube), then select the red button it reveals the greenCube and hides the redCube (as it should) but when you click the green button again you need to click twice to hide the greenCube (which shouldn't happen). Sorry for my lack of coding knowledge but see my files here…
http://we.tl/YY02PkqHCl
ok I gave it a go. But it seems when I have two buttons (red and green), where red should hide and reveal the redCube (but also reveal the greenCube if it was hidden) and where green should hide and reveal the greenCube (but also reveal the redCube if it was hidden) is a bit buggy.
eg if you select the green button (which hides the greenCube), then select the red button it reveals the greenCube and hides the redCube (as it should) but when you click the green button again you need to click twice to hide the greenCube (which shouldn't happen). Sorry for my lack of coding knowledge but see my files here…
http://we.tl/YY02PkqHCl
14 October 2015 11:09
Manager and 3D Generalist at Blend4Web
No pain, no gain.
mikhail@blend4web.com
No pain, no gain.
mikhail@blend4web.com