I stumbled across a weird behaviour while using rotations.
When i put this simple line in the init-function, the object is rotated smoothly as it should:
go.animate(".", “euler.z”, go.PLAYBACK_LOOP_FORWARD, 360, go.EASING_LINEAR, 2.0)
But as soon as i put the same line into my update-function, the animation stops when reaching 90° instead of going the full circle. I thought it would be canceled and then restarted with each update-call which should cause no such problems. Or am i’m wrong here?
To make things even more strange try this:
- Put the line back into the init-function
- Put a simple angle = go.get(".",“euler.z”) into your update-function
Now the animation behaves totally crazy. It again stops at 90° but this time the gameobject also flickers around very strangely. I have no explanation why simply reading the euler.z property during update results in breaking the animation.
I’ll now call this a schroedingers rotation. As soon as you look at it, it changes it’s value