Class PathConstraintSettings

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

public class PathConstraintSettings extends TwoBodyConstraintSettings
Settings used to construct a PathConstraint.
  • Constructor Details

    • PathConstraintSettings

      public PathConstraintSettings()
      Instantiate default settings.
  • Method Details

    • getMaxFrictionForce

      public float getMaxFrictionForce()
      Return the maximum friction force when not driven by a motor. The settings are unaffected. (native field: mMaxFrictionForce)
      Returns:
      the force (in Newtons)
    • getPath

      public PathConstraintPath getPath()
      Access the path. (native field: mPath)
      Returns:
      a new JVM object with the pre-existing native object assigned
    • getPathFraction

      public float getPathFraction()
      Return how far the body is along the path initially. The settings are unaffected. (native field: mPathFraction)
      Returns:
      the amount
    • getPathPosition

      public Vec3 getPathPosition()
      Copy the starting location. The settings are unaffected. (native field: mPathPosition)
      Returns:
      a new vector
    • getPathRotation

      public Quat getPathRotation()
      Copy the initial rotation. The path is unaffected. (native field: mPathRotation)
      Returns:
      a new quaternion
    • getPositionMotorSettings

      public MotorSettings getPositionMotorSettings()
      Access the settings of the position motor. (native field: mPositionMotorSettings)
      Returns:
      new JVM object with the pre-existing native object assigned
    • getRotationConstraintType

      public EPathRotationConstraintType getRotationConstraintType()
      The settings are unaffected. (native field: mRotationConstraintType)
      Returns:
      the enum value (not null)
    • setMaxFrictionForce

      public void setMaxFrictionForce(float force)
      Alter the maximum friction force when not driven by a motor. (native field: mMaxFrictionForce)
      Parameters:
      force - the desired force (in Newtons)
    • setPath

      public void setPath(PathConstraintPath path)
      Replace the current path with the specified one. (native field: mPath)
      Parameters:
      path - the desired path (not null)
    • setPathFraction

      public void setPathFraction(float amount)
      Alter how far the body is along the path initially. (native field: mPathFraction)
      Parameters:
      amount - the desired amount (≥0)
    • setPathPosition

      public void setPathPosition(Vec3Arg location)
      Alter the initial location. (native field: mPathPosition)
      Parameters:
      location - the desired location (not null, unaffected)
    • setPathRotation

      public void setPathRotation(QuatArg orientation)
      Alter the initial orientation. (native field: mPathRotation)
      Parameters:
      orientation - the desired orientation (not null, unaffected)
    • setPositionMotorSettings

      public void setPositionMotorSettings(MotorSettings motorSettings)
      Alter the motor settings. (native field: mPositionMotorSettings)
      Parameters:
      motorSettings - the desired settings (not null, unaffected)
    • setRotationConstraintType

      public void setRotationConstraintType(EPathRotationConstraintType type)
      Alter the (native field: mRotationConstraintType)
      Parameters:
      type - the desired type (not null)