This project has moved and is read-only. For the latest updates, please go here.

Rotation Question

Apr 19, 2012 at 7:39 AM

So I have a list of circle fixtures, and a main ball which is a circle fixture.

Lets say the main ball collides with a random circle. Upon collision, they're forming a slider joint. Until breaking, I want the main ball to orbit around the circle. I couldn't find anything in the engine that would handle something such as this so I implemented this below:


private Vector2 Rotate(float angle, float distance, Vector2 center)       

{            return new Vector2((float)(distance * Math.Cos(angle)), (float)(distance * Math.Sin(angle))) + center;       


The the main ball essentially rotates around the circle once, but stops back where it started, even though it is continuously being called until broken. Sorry for my lack of math skills, it has been years since I've taken trig, let alone remember half of it. If anyone knows anything in farseer that would accomplish this, I would appreciate it.

Thank you.