Forum

Create a Turntable Animation ?

09 May 2016 04:13 #9356
Hello guys I'm new using Blend4Web, right now I read and study the demo files, of course not all the files it's to big. I want to create an animation like this one for the camera.

It's a Turntable Animation. Of course

https://www.youtube.com/watch?v=u_MEZfxzch0

I no have idea what is the best way to do it I made that animation using keyframes in Blender of course the camera focus the plane and then moves around, but how you can do this in Blend4Web ?
Using logic nodes will do the job ?
Or Is better to use JS I'm not sure. I guess I can animate the camera but that will stops the interaction, right ?
Thanks.
09 May 2016 07:07 #9357
So there's an option who do that in the browser. That is called autorotate you can also write
?autorotate in the browser to activate that.
Of course right now I want to enable autorotate after some idle time, that would we amazing !!!
Here I found the how to do that
https://www.youtube.com/watch?v=eT2wzefkDj0
10 May 2016 14:46 #9386
Of course right now I want to enable autorotate after some idle time, that would we amazing !!!
Hi. This would require some coding.

Autorotation can be started through this special method: auto_rotate().
You just need to know when a user interacted with the application last time.

I think the easiest way is to check whether the camera moves or not. Also, you need to track the elapsed time. To achieve this you can use the combination of timeline and motion sensors.

I've attached the example where rotation starts after the certain amount of time idling. If you want to know more about sensors, you can check the documentation here: event-driven-model.

You can also implement different logic, for example, detect mouse/keyboard/touch actions using regular event listeners and count down the time passed via performance.now() and so on… The main point is to use the "auto_rotate" method to start rotation.
Blend4Web Team
 
Please register or log in to leave a reply.