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

Body spinning on a rope

Topics: Developer Forum
Mar 1, 2014 at 11:52 PM
Hello there. I'm playing around with Farseer and for now what I want to make a ball on a rope that could be swung around with mouse.

I added two bodies (ball and box), linked them with a rope and made the box Kinematic to move it with SetTransform() on each update. It works, but not the way I want it to: the ball never makes a 'loop' around the box - whenever it gets to the upper part of its trajectory's circle - it loses the speed and just falls down. It's like he's lacking inertia - looks like it's the box that spins around the ball, not the other way.

The question is: is it possible to make the BALL spin using Farseer or should I consider writing my own physics simulation for this case?

P.S. If I manually apply a linear impulse - ball spins around as desired, so I assume it's possible to do what I want - I'm just doing smth wrong. Most likely Im lacking some knowledge. Be it physics knowledge or the knowledge of the engine :)
Mar 3, 2014 at 10:05 PM
Probably I can achieve the desired behaviour using ApplyLinearImpulse() on the ball and passing it a value based on the box's current velocity. The only problem left to solve then is WHEN to apply impulse and when not to. Applying it all the time makes it look unrealistic at all.
Mar 5, 2014 at 5:19 PM
And one more problem - the elastic rope. Looks like if you apply too much force\impulse to a body on a rope - the rope stretches independent of the MaxLength property. Also, DistanceJoint does that too :|