An anti rollbar is a stiff spring that connects two wheels to reduce the amount of roll the vehicle makes in sharp corners See: Anti-roll Bar
Sets the radius of the sphere used in cast. Note, that castType needs to be set to
VEHICLE_CAST_TYPE_SPHERE
for this to be used.
Sphere radius.
World space up vector, used to avoid colliding with vertical walls.
Cast world up vector.
How long it takes to release the clutch (go to full friction), only used when mode
is set to TRANSMISSION_AUTO
.
Clutch release time.
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
.
Slip ratio.
The PlayCanvas Entity that is used as a visual model for the vehicle body. Its position and rotation will automatically be updated to match the physical body.
Entity or null
if none is set.
Vector indicating forward direction of the vehicle (in local space to the body).
Vehicle forward vector.
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.
Max pitch/roll angle in radians.
Curve that describes a ratio of the max torque the engine can produce vs the fraction of the max RPM of the engine.
Ratio curve.
Override for the number of solver position iterations to run. If set to 0
, the constraint
will use global default set by Physics initialization setting
JoltInitSettings.numPositionSteps.
Override for the number of solver velocity iterations to run. If set to 0
, the constraint
will use global default set by Physics initialization setting
JoltInitSettings.numVelocitySteps.
If RPM of engine is smaller then this we will shift a gear down, only used when mode
is set to TRANSMISSION_AUTO
.
Lower RPM threshold.
If RPM of engine is bigger then this we will shift a gear up, only used when mode
is set to TRANSMISSION_AUTO
.
Upper RPM threshold.
How long to wait after releasing the clutch before another switch is attempted (s), only
used when mode is set to TRANSMISSION_AUTO
.
Clutch switch time.
How long it takes to switch gears, only used only used when mode is set to
TRANSMISSION_AUTO
.
Gear switch time.
Vector indicating the up direction of the vehicle (in local space to the body).
Vehicle up vector.
Destroy this constraint. The connected bodies will be activated.
Sets driver steering input for the vehicle.
Forward input in [-1:1] range.
Right input for wheeled and moto vehicles in [-1:1] range. Left ratio for tracked vehicle in [-1:1] range.
Brake input for wheeled and moto vehicles in [0:1] range. Right ratio for tracked vehicle in [-1:1] range.
Hand brake for wheeled and moto vehicles in [0:1] range. Brake input for tracked vehicle in [0:1] range.
Allows to enable/disable a constraint without destroying it.
true
- enable constraint, false
- disable.
Optional
activate: boolean = trueIf true
, activate connected bodies after changing the state.
Motorcycle Vehicle Constraint.