Hi Daniel, Thanks for the reply.
Actually Im trying to create a navigational controller for my game object boat(top view). Here boat has to move and face towards the user touchPoint. Boat movement towards touchPoint is done. And rotation has some problem in uint conversion. Below is the code which I written for boat rotation.
float radian;
SPPoint* difference = [[SPPoint alloc] init];
difference.x = _touchPoint.x - _currentPoint.x;
difference.y = _touchPoint.y - _currentPoint.y;
radian = atan2f(difference.y, difference.x);
_paperBoat.rotation = SP_R2D(radian);
Result: Boat is rotating at its center point continuously and also moving towards touchPoint.
I have done this same logic for many times in Flash AS3 but here some thing Im missing.
Hope you understand now.
Any and all ideas and suggestions are welcome.
Thanks & Regards,
Venkatesh S