No Effect from Joints

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

Greetings,

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?

Thanks!

swine

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

Brillian! Thanks :)

Dec 29, 2010 at 7:07 PM

*t