Forum

Trigger animation upon approach

27 December 2016 16:35
Hi all,

I have a question regarding triggering an animation.

Picture a double door that like in shops that opens when you approach it.
Currently, I have made it so that the user has to click on the door for them to slide open. But I'd like to trigger the action when the user approaches the doors (I'm using firstperson view).

How would I have to do that?

Thanks for the help. :)

Btw, I am still using Version 16.10.
29 December 2016 10:33
Hi and welcome!

In short, you'll need an invisible Ghost collision mesh placed near a door
https://www.blend4web.com/doc/en/physics.html#static-physics-type

Then you use a collision sensor in your app (see this tut)

The PRO version includes a working example (the Farm demo).
The Founder | Twitter | Facebook | Linkedin
29 December 2016 10:39
Hi! Are you using logic nodes or javascript for that? Detecting the user position cannot be done via the node system, it requires coding.
31 December 2016 02:15
Hi!
Sorry for the late reply.

Thank you both for your answers.
I was indeed looking for a way to do it with nodes. Thank you for pointing me in the right direction with your links and explanations.

Cheers!
 
Please register or log in to leave a reply.