Hi, I'm applying 2d torque to a sprite using a 2d rigidbody and the object rotates fine on the Z axis. I'm using unity 4.3.3 with its new 2d system.
But I need to do some actions depending on the rotation speed, and it looks like the rotation is irregular instead of smooth, sometimes increasing and sometimes decreasing even if I'm not applying any forces or modifications to the object and it is only decreasing the rotation on its own.
I need to be exact because I'm modifying the pitch of a sound depending on the rotation speed, and if the change in speed is not smooth then the audio results are a terrible mess. (I have other possible ways of doing this smoothly by lerp, but I still need to know if the object is accelerating or not, without any sudden changes).
I'm measuring the rotation speed by getting the difference between the rotation on this frame and the previous frame. I'm also fixing the difference that happens when the rotation goes over 360 and continues from 0, but that's not the problem because I get irregular readings while doing small rotations far from the 360 point.
I tried looking for actions in playmaker that will help me get the rotation speed, but all of them are written for the 3d system and don't seem to work with 2d.
Is this something that normally happens with physics, so precise measuring should be avoided?
Might it be a problem with the new 2d system in unity?
Is there a different and better way to do this instead of comparing the rotation on different frames?
Thanks in advance