TranslationalConstraint constructor
TranslationalConstraint(
- Joint joint,
- LimitMotor limitMotor
A translational constraint for various joints.
joint
joint of translational constraint
limitMotor
limit and motor of the translational constraint
Implementation
TranslationalConstraint(Joint joint, this.limitMotor):super(joint.config){
b1=joint.body1!;
b2=joint.body2!;
p1=joint.anchorPoint1;
p2=joint.anchorPoint2;
r1=joint.relativeAnchorPoint1;
r2=joint.relativeAnchorPoint2;
l1=b1.linearVelocity;
l2=b2.linearVelocity;
a1=b1.angularVelocity;
a2=b2.angularVelocity;
i1=b1.inverseInertia;
i2=b2.inverseInertia;
p1=joint.anchorPoint1;
p2=joint.anchorPoint2;
r1=joint.relativeAnchorPoint1;
r2=joint.relativeAnchorPoint2;
}