Rock back and forth
ck
Member Posts: 224
Does anyone know how to make an actor gently rock (rotate) back and forth, and also limit their rotation on collision with another actor?
Comments
regards,
http://gamesalad.com/game/play/40104
But you just might be wanting just a rotation back-n-forth. I do one with two "rotate to angle" behaviors. If they traverse 0/360 degrees, you may have to play around a bit. You could try just "rotate" behaviors with rules to detect the rotation and stop upon passing it (don't use equal).
For no rotation on collision, you can check the checkbox for "Physics->Fixed Rotation".
In the end, I've gone for the solution of this:
Set the angular velocity to 5
In a timer, every 2 seconds, change the angular velocity to the negative of the angular velocity.
That seems to have done the trick.