I'm trying to use the cpvrotate function to rotate an object I'm drawing. It's easy when I have a corresponding object, but this time I'm trying to do it with a radian value. Having a look at the rotation of some cpBodies, I got this:
Code: Select all
//rad is between -M_PI (-3.14...) and M_PI (3.14)
cpVect rot = cpv(1.0f, rad/M_PI);
How can I change the code to fix this?
Thanks!