I'm noticing some odd behaviour with my SliderJoints; when they're attached to a body with a Local Vector of (0,0), they work perfectly.
If there's an offset, (0, 1) for example, collision becomes sporadic. Objects judder into the fixture attached to the slider joint.
I've recreated it in the testbed. Image here: http://img696.imageshack.us/i/sliderjointtestbed.png/
FixtureFactory.CreateEdge(World, new Vector2(-40, 0), new Vector2(40, 0));
Fixture fA = FixtureFactory.CreateRectangle(World, 4, 4, 1, new Vector2(0, 28));
fA.Body.BodyType = BodyType.Static;
Fixture fB = FixtureFactory.CreateRectangle(World, 4, 4, 1, new Vector2(0, 4));
fB.Body.BodyType = BodyType.Dynamic;
Fixture fLoose = FixtureFactory.CreateCircle(World, 2, 1, new Vector2(0, 10));
fLoose.Body.BodyType = BodyType.Dynamic;
SliderJoint joint = new SliderJoint(fA.Body, fB.Body, Vector2.Zero, new Vector2(0, 1), 5, 20);
Dragging fLoose into fB will cause it to embed slightly.
Is this expected behaviour? Any ideas how I can prevent this? At the moment, any object attached to a SliderJoint can't be walked on by my player character...
Feb 20, 2011 at 5:36 PM
This discussion has been copied to a work item. Click
here to go to the work item and continue the discussion.