Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

Reseting a touch-rotate?

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

Post Reply
Asta_D

Reseting a touch-rotate?

Post by Asta_D » 14 Oct 2013, 15:41

Hello

First: I am new to Ventuz and i'm learning to work with it by using the PLE. But i have to say: i love it! It is greate and the help an the tutorials are making it easy to get used to it.
Mesh-import, touch-functionallity, animation, everything works fine.
But i have one question: i have an object that is rotatable by a touch rotation node. Works good. But now, i created a button, which acts as reset. If the button is touched, the object shoud rotate back to its initial state. Let's say, i rotated the object by touch to 124° and now by touching the reset-button it should rotate back to 0°. How do i do that. Creating an animation is not the problem. The problem i have is, creating an animation from the current value back to a start value.
I hope you undertand what i mean.

Kind Regards
Asta

schub
Posts: 54
Joined: 02 Feb 2012, 11:43

Re: Reseting a touch-rotate?

Post by schub » 15 Oct 2013, 09:36

Hi Asta,

if I understood you correctly, you want the object to rotate back to 0° in a smooth motion instead of jumping directly.

First, deactivate the 'motion' property of your object, this 'disconnects' the object from the node (you cant see this connection because its done internally through hierarchy tree).
Create an axis before the object and connect the desired rotation value to the touch rotation.
Now it should behave like before, but we can now manipulate the data coming out of the touch node.

Drag and drop the damper or linear node on the connection
Set the target2 to '0' and modulo to '360' (modulo is needed when you make more than 1 full rotation, the object will spin very fast without it)
If you activate useTarget2, you'll get the animation you want.
Once the interpolation is complete, you should reset the touchRotation and deactivate useTarget2.
Now you can start over by rotating the object.
Oh, and deactivate the interpolation of the damper while you rotate it via touch node, otherwise the movement will be delayed by the interpolation.

greetings
schub

Post Reply