Originally Posted By: peteredlin
How can i easy check if the value jumps from '-' to '+' ?

Pretty easy, just check if the most significant bit changed. If it did, the value switched from positive to negative or vice versa.


Quote:
did you create the code yourself or do you use the physic engine?

This really doesn't matter as the physics engine changes the same parameters as eg. c_move would do (well, in this case it would be more c_rotate).



To solve ops problem: Just measure how long one rotation took in seconds and milliseconds (stored as floating point). When calculating the rpm, you can simply do this:
Code:
var rpm = 1.0/timeForRotation;




Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com