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!

Reset rotation value . . .

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

Moderator: Support

Post Reply
spikylaura
Posts: 28
Joined: 26 Jan 2012, 11:53

Reset rotation value . . .

Post by spikylaura » 24 Jul 2012, 14:47

Hi all,

This is probably one of those very simple things when you know how: I would like to rotate an object on one axis, and when 360 degrees is complete, reset the value to 0, but without the object spinning back.

Hope you can help.

Many thanks

Paul

chriss0212
Posts: 666
Joined: 18 Jan 2012, 20:56
Location: wuppertal
Contact:

Re: Reset rotation value . . .

Post by chriss0212 » 24 Jul 2012, 20:52

have you tried to use the modulo propertie?

greetz

christian

User avatar
Daniel Willer
Posts: 309
Joined: 06 Jan 2012, 18:12

Re: Reset rotation value . . .

Post by Daniel Willer » 25 Jul 2012, 09:47

Chris is right just take a float expression and make a modulo 360. The resulting expression would look like
A % 360

spikylaura
Posts: 28
Joined: 26 Jan 2012, 11:53

Re: Reset rotation value . . .

Post by spikylaura » 25 Jul 2012, 09:59

Thanks for your quick replies. I'm unfamiliar with the Modulo property, so thanks for the heads up. I'll have a look today and let you now how I get on.

Many thanks,

Paul

spikylaura
Posts: 28
Joined: 26 Jan 2012, 11:53

Re: Reset rotation value . . .

Post by spikylaura » 25 Jul 2012, 12:09

Rotation Example.vza
(9.54 KiB) Downloaded 295 times
I have attached an example to illustrate what I'm trying to achieve. The object has 2 sides - A & B. There are 3 animation states - S1, S2 and S3. S1 shows side A at 0 deg, S2 shows side B at 180 deg S3 shows Side A again at 360 deg.

What I would like to happen is when the animation reaches S3, to effectively swap to S1, or 0 deg, without the object "rewinding' through 360 deg.

I'm not quite sure how to use the modulo function of the Math Effects, so I don't know if this will achieve what I'm trying to do.

Many thanks for any help you can offer.

Paul

TobiTobsen
Posts: 93
Joined: 18 Jan 2012, 20:02

Re: Reset rotation value . . .

Post by TobiTobsen » 25 Jul 2012, 14:28

Hi,
what modulo does is that it returns the rest atfter dividing.
For a few programming languages a "%" is the sign for the modulo operation.
So lets say 180%360 returns 180.
540%360 returns again 180.
360%360 retrurns 0 as there is no rest.

I can not really see the flipping problem in you scene but i have attached a scene with a modulo expression.

Cheers,
Tobi
Attachments
Rotation Example_Mod.vza
(9.04 KiB) Downloaded 273 times
http://www.radar-touch.com
http://www.prime-touch.com

Want to filter or transform TUIO data? http://code.google.com/p/tuiotoolbox/
Looking for a tool generating Testpattern for Softedge projections??? I can help: http://code.google.com/p/projection-calc/

Stefan Goerke
Posts: 10
Joined: 18 Jan 2012, 11:59

Re: Reset rotation value . . .

Post by Stefan Goerke » 30 Jul 2012, 12:53

Hi,

it is possible to jump from one value to another by using the "jump" interpolation type in the diagram view of the animation editor.
see aso here:
http://www.ventuz.com/support/help/v3_0 ... ditor.html

Sometimes using the Mover node could be also an opportunity.

with best regards,
Stefan
Attachments
endless rotation demo.vza
(12.06 KiB) Downloaded 267 times

Post Reply