Animate 360° rotation

I am trying to animate infinite rotation around z axis.
A natural approach would be something like

go.animate(".", "rotation", go.PLAYBACK_LOOP_FORWARD, vmath.quat_rotation_z(math.pi), 
 ,go.EASING_LINEAR, 4)

, which rotates for 180 degrees and than jumps back.
How to rotate for full 360 degrees infinitly?

You could try using “euler.z” and 360 instead if that helps.

2 Likes

2.0 * math.pi and NOT math.pi

math.pi = 180 degree

2 Likes

I was not clear enoguh in my initial post.
setting rotation to 360 degrees will achieve nothing, since there is no need for rotation.

go.animate(..., vmath.quat_rotation_z(2*math.pi),  ,go.EASING_LINEAR, 4)

will have no visible effect. I thoungh this is trivial to undrestand.

A workaround would be to just rotate for half a turn, and than continue from there on. This is what I was talking about in my initial post.

Clearly I have zero knowledge about this topic. Please change your answer in a way to provide more insight into how to animate 360° rotation.

Isn’t this what you are asking for?

1 Like

This is it zeah. Thank you!

1 Like