Physics Components
    Preparing search index...

    Class MotoVehicleConstraint

    Motorcycle Vehicle Constraint.

    Hierarchy (View Summary)

    Index

    Accessors

    • get castType(): number

      Collision tester that tests wheels collision. Following types available:

      VEHICLE_CAST_TYPE_RAY
      
      VEHICLE_CAST_TYPE_SPHERE
      
      VEHICLE_CAST_TYPE_CYLINDER
      

      Returns number

      Cast type number.

      VEHICLE_CAST_TYPE_RAY
      
    • get clutchStrength(): number

      Strength of the clutch when fully engaged. Total torque a clutch applies is

      Torque = ClutchStrength * (Velocity Engine - Avg Velocity Wheels At Clutch)
      

      Returns number

      Clutch strength

      10 (k m^2 s^-1)
      
    • get differentialLimitedSlipRatio(): number

      Ratio max / min average wheel speed of each differential (measured at the clutch). When the ratio is exceeded all torque gets distributed to the differential with the minimal average velocity. This allows implementing a limited slip differential between differentials. Set to Number.MAX_VALUE for an open differential. Value should be greater than 1.

      Returns number

      Slip ratio.

      1.4
      
    • get leanSpringIntegrationCoefficient(): number

      The lean spring applies an additional force equal to:

      coefficient * Integral(delta angle, 0, t)
      

      This effectively makes the lean spring a PID controller.

      Returns number

      • Integration coefficient.
      0
      
    • get maxPitchRollAngle(): number

      Defines the maximum pitch/roll angle, can be used to avoid the car from getting upside down. The vehicle up direction will stay within a cone centered around the up axis with half top angle maxPitchRollAngle, set to pi to turn off.

      Returns number

      Max pitch/roll angle in radians.

      ~1.04 rad (60 degrees)
      

    Methods

    • Sets driver steering input for the vehicle.

      Parameters

      • input0: number

        Forward input in [-1:1] range.

      • input1: number

        Right input for wheeled and moto vehicles in [-1:1] range. Left ratio for tracked vehicle in [-1:1] range.

      • input2: number

        Brake input for wheeled and moto vehicles in [0:1] range. Right ratio for tracked vehicle in [-1:1] range.

      • input3: number

        Hand brake for wheeled and moto vehicles in [0:1] range. Brake input for tracked vehicle in [0:1] range.

      Returns void