Skip to content

eulerjs API / @eulerjs/vehicle / Wheel

Wheel ​

Defined in: packages/vehicle/src/RaycastVehicle.ts:55

One wheel of a RaycastVehicle: how it is built, what the driver sets (steering, drive and brake), and what it was doing on the last step.

Constructors ​

Constructor ​

ts
new Wheel(options): Wheel;

Defined in: packages/vehicle/src/RaycastVehicle.ts:112

Parameters ​

ParameterType
optionsWheelOptions

Returns ​

Wheel

Properties ​

PropertyModifierTypeDefault valueDescriptionDefined in
brakeForcepublicnumber0The most force the brake slows the wheel with, in newtons. It stops the wheel, but never drives it backward.packages/vehicle/src/RaycastVehicle.ts:80
brakeTorquepublicnumber0With tyres: 'slip': the most torque the brake slows the wheel's spin with, in N·m. brakeForce adds to it, times the radius.packages/vehicle/src/RaycastVehicle.ts:84
centerreadonlyVector3...Where the wheel's centre is, in world space, for drawing it.packages/vehicle/src/RaycastVehicle.ts:110
compressionpublicnumber0How far its spring was compressed, in metres; 0 off the ground.packages/vehicle/src/RaycastVehicle.ts:89
contactNormalreadonlyVector3...-packages/vehicle/src/RaycastVehicle.ts:104
contactPointreadonlyVector3...Where the tyre touched the ground, and the ground's normal there, in world space.packages/vehicle/src/RaycastVehicle.ts:103
curveShapereadonlynumberundefinedThe tyre curve's shape and stiffness (Pacejka's C and B), from slidingGrip.packages/vehicle/src/RaycastVehicle.ts:72
curveStiffnessreadonlynumberundefined-packages/vehicle/src/RaycastVehicle.ts:73
driveForcepublicnumber0The force the engine drives the tyre forward with, in newtons; negative drives it backward.packages/vehicle/src/RaycastVehicle.ts:78
driveTorquepublicnumber0With tyres: 'slip': the torque the engine drives the wheel with, in N·m; negative drives it backward. driveForce adds to it, times the radius.packages/vehicle/src/RaycastVehicle.ts:82
grippublicnumberundefinedChange it to make the tyre slide more or less, as a handbrake does to the rear tyres.packages/vehicle/src/RaycastVehicle.ts:62
groundpublicBody | undefinedundefinedWhat it stood on.packages/vehicle/src/RaycastVehicle.ts:106
inertiapublicnumberundefinedIn kg·m².packages/vehicle/src/RaycastVehicle.ts:65
loadpublicnumber0How hard the ground pushed on the tyre, in newtons.packages/vehicle/src/RaycastVehicle.ts:91
loadSensitivitypublicnumberundefined-packages/vehicle/src/RaycastVehicle.ts:69
mountreadonlyVector3undefined-packages/vehicle/src/RaycastVehicle.ts:56
nominalLoadpublicnumber | undefinedundefined-packages/vehicle/src/RaycastVehicle.ts:70
onGroundpublicbooleanfalseWhether the tyre was on the ground on the last step.packages/vehicle/src/RaycastVehicle.ts:87
peakSlipAnglepublicnumberundefined-packages/vehicle/src/RaycastVehicle.ts:66
peakSlipRatiopublicnumberundefined-packages/vehicle/src/RaycastVehicle.ts:67
radiusreadonlynumberundefined-packages/vehicle/src/RaycastVehicle.ts:57
rollingResistancepublicnumberundefined-packages/vehicle/src/RaycastVehicle.ts:63
slidingpublicbooleanfalseWhether the tyre was asked for more grip than it has, and slid; with tyres: 'slip', whether it was past its peak.packages/vehicle/src/RaycastVehicle.ts:93
slidingGripreadonlynumberundefined-packages/vehicle/src/RaycastVehicle.ts:68
slipAnglepublicnumber0With tyres: 'slip': the angle between where the tyre points and where it goes, in radians, positive sliding to its left.packages/vehicle/src/RaycastVehicle.ts:99
slipRatiopublicnumber0With tyres: 'slip': (spin × radius − speed) / speed on the last step: positive spinning up, −1 locked.packages/vehicle/src/RaycastVehicle.ts:97
spinAnglepublicnumber0How far the wheel has turned about its axle, in radians, for drawing it.packages/vehicle/src/RaycastVehicle.ts:101
spinSpeedpublicnumber0With tyres: 'slip': how fast the wheel spins about its axle, in rad/s, positive rolling forward.packages/vehicle/src/RaycastVehicle.ts:95
springDampingpublicnumberundefined-packages/vehicle/src/RaycastVehicle.ts:60
springStiffnesspublicnumberundefined-packages/vehicle/src/RaycastVehicle.ts:59
steerAnglepublicnumber0How far the wheel is turned about its strut, in radians: positive turns it to the body's left.packages/vehicle/src/RaycastVehicle.ts:76
surfacepublicGroundSurface | undefinedundefinedWhat RaycastVehicleOptions.surface said the ground was like where it touched, on the last step.packages/vehicle/src/RaycastVehicle.ts:108
suspensionLengthreadonlynumberundefined-packages/vehicle/src/RaycastVehicle.ts:58

Released under the MIT License.