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

No Effect from Joints

Topics: Developer Forum
Dec 29, 2010 at 8:00 PM


I'm trying to create a revolute joint such as:


            Body otherBody = BodyFactory.CreateBody(World);
            otherBody.BodyType = BodyType.Dynamic;
            CircleShape otherShape = new CircleShape(m_radiusInMeters);
            Fixture otherFixture= otherBody.CreateFixture(otherShape);

            Body body = BodyFactory.CreateBody(World);
            body.BodyType = BodyType.Dynamic;
            CircleShape shape = new CircleShape(m_radiusInMeters);
            Fixture fixture = body.CreateFixture(shape);

            RevoluteJoint joint = 
                JointFactory.CreateRevoluteJoint(body, otherBody, new Vector2(0.3f, 0.3f));


The joints are not having any effect at all. (I can throw the objects around the screen with the mouse ok, but they are not connected by the joint).

What am I missing? Where can I look to troubleshoot the problem?



Dec 29, 2010 at 8:05 PM
You need to add the joint to the World object.
Dec 29, 2010 at 8:06 PM

Brillian! Thanks :)

Dec 29, 2010 at 8:07 PM