Class VehicleConstraintSettings

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

public class VehicleConstraintSettings extends ConstraintSettings
Settings used to construct a VehicleConstraint.
  • Constructor Details

    • VehicleConstraintSettings

      public VehicleConstraintSettings()
      Instantiate default settings.
  • Method Details

    • addWheels

      public void addWheels(WheelSettings... wheelSettingsArray)
      Append the specified wheel settings. (native attribute: mWheels)
      Parameters:
      wheelSettingsArray - the wheel settings to append
    • getController

      public VehicleControllerSettings getController()
      Access the controller settings.
      Returns:
      a new JVM object that refers to the pre-existing native object
    • getForward

      public Vec3 getForward()
      Copy the "forward" vector. The settings are unaffected. (native attribute: mForward)
      Returns:
      a new direction vector
    • getMaxPitchRollAngle

      public float getMaxPitchRollAngle()
      Return the vehicle's maximum pitch/roll angle. The settings are unaffected. (native attribute: mMaxPitchRollAngle)
      Returns:
      the angle (in radians)
    • getWheels

      public WheelSettings[] getWheels()
      Enumerate the wheel settings. The settings are unaffected. (native attribute: mWheels)
      Returns:
      a new array of pre-existing objects
    • getUp

      public Vec3 getUp()
      Copy the "up" vector. The settings are unaffected. (native attribute: mUp)
      Returns:
      a new direction vector
    • setController

      public void setController(VehicleControllerSettings controllerSettings)
      Alter the how the vehicle accelerates and decelerates. (native attribute: mController)
      Parameters:
      controllerSettings - the desired settings (not null)
    • setForward

      public void setForward(Vec3Arg forward)
      Alter the forward direction. (native attribute: mForward)
      Parameters:
      forward - the desired forward direction (not null, unaffected, default=(0,0,1))
    • setMaxPitchRollAngle

      public void setMaxPitchRollAngle(float angle)
      Alter the vehicle's maximum pitch/roll angle. (native attribute: mMaxPitchRollAngle)
      Parameters:
      angle - the desired limit (in radians, default=Pi)
    • setUp

      public void setUp(Vec3Arg up)
      Alter the up direction. (native attribute: mUp)
      Parameters:
      up - the desired up direction (not null, unaffected, default=(0,1,0))