How to detect angles in wck

IstvanOrosi wrote:If I remember correctly, object rotation values will be between 180 and -180, so your current code will not be able to do what you want. That's why you have to use your own rotation variable and keep track if the object has rotated more than 180 (or -180)


If that's true you could probably just keep track of the rotation value from the previous frame and check if it suddenly flips from positive to negative for large rotation values.
@Istvan , @Mayo - thanks a lot i will give that a try and let you know soon ...

Regards
Jin
I checked it and rotation angle values are indeed between 180 and -180.
@istvan - yes i also found that but still if the body rotates fast it does not detect backflip and frontflip but shows front flip once and backflip next and vice versa ....

Thanks for the help once again ...

Regards
Jin

Original thread: https://box2d.org/forum/viewtopic.php?t=9337