Page 1 of 1

General question, difference of Joints and JointLimits

Posted: Thu Nov 25, 2010 3:21 pm
by philip
Hi,

currently I don't exactly get the difference of Joints and JointLimits. This example has (for me) the same effect as the one afterwards:

Code: Select all

            Box a = new Box(Vector3.Zero, 1.0f, 1.0f, 1.0f);
            space.Add(a);
            Box b = new Box(new Vector3(2.0f, 0.0f, 0.0f), 1.0f, 1.0f, 1.0f, 1.0f);
            space.Add(b);
            DistanceLimit limit = new DistanceLimit(a, b, Vector3.Zero, new Vector3(2.0f, 0.0f, 0.0f), 1.0f, 2.0f);
            space.Add(limit);

Code: Select all

            Box a = new Box(Vector3.Zero, 1.0f, 1.0f, 1.0f);
            space.Add(a);
            Box b = new Box(new Vector3(2.0f, 0.0f, 0.0f), 1.0f, 1.0f, 1.0f, 1.0f);
            space.Add(b);
            DistanceJoint joint = new DistanceJoint(a, b, Vector3.Zero, new Vector3(2.0f, 0.0f, 0.0f));
            space.Add(joint);
What am I missing here? Can I see a JointLimit as a Joint with the extra-feature of having an allowed range of limits?

Re: General question, difference of Joints and JointLimits

Posted: Thu Nov 25, 2010 8:14 pm
by Norbo
A DistanceJoint and DistanceLimit are analagous (both 1DOF joints with similar construction). DistanceJoints maintain a single distance, while DistanceLimits maintain a minimum and maximum distance. The connected points can have a distance anywhere within that range.

Re: General question, difference of Joints and JointLimits

Posted: Fri Nov 26, 2010 11:58 am
by philip
Alright, so in general, I can see JointLimits as a group of joints with some additional features. :)