The car chassis body.
Optional indexIndex of the forward axis. x=0, y=1, z=2
Optional indexIndex of the right axis. x=0, y=1, z=2
Optional indexIndex of the up axis. x=0, y=1, z=2
The car chassis body.
The constraints.
Index of the forward axis. x=0, y=1, z=2
Index of the right axis. x=0, y=1, z=2
Index of the up axis. x=0, y=1, z=2
Number of wheels on the ground.
Optional pre-step callback.
Optional pre-step callback.
Will be set to true if the car is sliding.
The wheels.
Add the vehicle including its constraints to the world.
Add a wheel. For information about the options, see WheelInfo.
Optional options: { Optional axleaxleLocal
Optional axleaxleWorld
Optional chassisConnection point, defined locally in the chassis body frame.
Optional chassischassisConnectionPointWorld
Optional clippedclippedInvContactDotSuspension
1
Optional customSpeed to apply to the wheel rotation when the wheel is sliding.
-0.1
Optional dampingdampingCompression
10
Optional dampingdampingRelaxation
10
Optional deltadeltaRotation
0
Optional directiondirectionLocal
Optional directiondirectionWorld
Optional forwardforwardAcceleration
Optional frictionfrictionSlip
10.5
Optional isisFrontWheel
true
Optional maxmaxSuspensionForce
Optional maxMax travel distance of the suspension, in meters.
1
Optional radius?: numberradius
1
Optional rollrollInfluence
0.01
Optional rotation?: numberRotation value, in radians.
0
Optional sidesideAcceleration
Optional skidskidInfo
0
Optional slipslipInfo
Optional steering?: numbersteering
0
Optional suspensionsuspensionForce
0
Optional suspensionsuspensionLength
0
Optional suspensionsuspensionMaxLength
2
Optional suspensionsuspensionRelativeVelocity
0
Optional suspensionsuspensionRestLength
1
Optional suspensionsuspensionStiffness
100
Optional useIf the customSlidingRotationalSpeed should be used.
false
Remove the vehicle including its constraints from the world.
Update one of the wheel transform. Note when rendering wheels: during each step, wheel transforms are updated BEFORE the chassis; ie. their position becomes invalid after the step. Thus when you render wheels, you must update wheel transforms before rendering them. See raycastVehicle demo for an example.
The wheel index to update.
Vehicle helper class that casts rays from the wheel positions towards the ground and applies forces.