The PointOnLineServo is used in the CarDemo for wheel suspensions and in the ConstraintTestDemo for isolated tests.a link to a demo that deals with PointOnLineServos specifically
Nope, but if there's a lot of constraint violation you could end up with a rather noticeable jerk as it pulls the character into position.Do the bodies need to be within a certain distance of each other in order to be able to link up with the constraint?
Code: Select all
servo = new PointOnLineServo()
{
LocalDirection = new Vector3(0, 1, 0),
ServoSettings = new ServoSettings(1, 1, 50),
LocalOffsetA = new Vector3(0, -4, 0),
LocalOffsetB = new Vector3(0, 5, 0),
};
The SpringSettings type itself catches this kind of incorrect configuration, but since the constructor isn't actually being run it doesn't have a chance. I'm going to add some validation to the constraint description ApplyDescription functions to act as a second line of defense and to catch configuration errors sooner.
The LocalOffsets seem a little bit suspicious too, even though they won't cause a NaN. Each LocalOffset is the point on the body that will be constrained to the line, so if the character is body A, then it will have an attachment point 4 units down along its local Y axis.