Class WheeledVehicleController

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

public class WheeledVehicleController extends VehicleController implements RefTarget
Control the acceleration and deceleration of a wheeled vehicle.
  • Method Details

    • setDriverInput

      public void setDriverInput(float forward, float right, float brake, float handBrake)
      Update the control inputs from the vehicle's driver.
      Parameters:
      forward - the desired driving direction and amount of acceleration (≥-1, ≤1)
      right - the desired steering angle (≥-1, ≤1)
      brake - the desired main brake pressure (≥0, ≤1)
      handBrake - the desired amount of hand braking (≥0, ≤1)
    • getRefCount

      public int getRefCount()
      Count the active references to the native WheeledVehicleController. The controller is unaffected.
      Specified by:
      getRefCount in interface RefTarget
      Returns:
      the count (≥0)
    • setEmbedded

      public void setEmbedded()
      Mark the native WheeledVehicleController as embedded.
      Specified by:
      setEmbedded in interface RefTarget
    • toRef

      Create a counted reference to the native WheeledVehicleController.
      Specified by:
      toRef in interface RefTarget
      Returns:
      a new JVM object with a new native object assigned