SliderJoint3D constructor

SliderJoint3D({
  1. EntityTarget connectedBody = EntityTarget.none,
  2. Vector3? anchor,
  3. bool enabled = true,
  4. Vector3? axis,
  5. bool useLimits = false,
  6. double minPosition = -1.0,
  7. double maxPosition = 1.0,
  8. double friction = 0.0,
  9. MotorState3D motor = MotorState3D.off,
  10. double motorTarget = 0.0,
  11. double motorMaxForce = 0.0,
})

A slider along axis (this entity's +X by default).

Implementation

SliderJoint3D({
  super.connectedBody,
  super.anchor,
  super.enabled,
  Vector3? axis,
  this.useLimits = false,
  this.minPosition = -1.0,
  this.maxPosition = 1.0,
  this.friction = 0.0,
  this.motor = MotorState3D.off,
  this.motorTarget = 0.0,
  this.motorMaxForce = 0.0,
}) : axis = axis ?? Vector3(1, 0, 0);