Class GearConstraint

All Implemented Interfaces:
ConstConstraint, ConstJoltPhysicsObject, ConstTwoBodyConstraint, RefTarget, AutoCloseable, Comparable<JoltPhysicsObject>

public class GearConstraint extends TwoBodyConstraint
A TwoBodyConstraint that links the angular velocities of the bodies. To be used in conjunction with 2 hinge constraints.
  • Method Details

    • setConstraints

      public void setConstraints(ConstConstraint hinge1, ConstConstraint hinge2)
      Specify the hinge constraints for each gear (optional).
      Parameters:
      hinge1 - the desired hinge constraint for the first gear (not null, unaffected)
      hinge2 - the desired hinge constraint for the 2nd gear (not null, unaffected)