WheelComponent

WheelComponent represents a wheel as a node in the powertrain system. It acts as a torque sink and cannot output to another PowertrainComponent.
Do not confuse WheelComponent with WheelController. The WheelComponent interfaces between the powertrain and the physical wheel simulation handled by WheelController.
Properties
| Property | Description |
|---|---|
wheelController |
Reference to the WheelController that handles physics simulation for this wheel |
wheelGroupSelector |
Assigns this wheel to a WheelGroup, which determines braking, steering, and geometry settings |
surfaceMapIndex |
Index of the current surface in the active SurfaceMap. Returns -1 if not grounded |
surfacePreset |
The SurfacePreset the wheel is currently in contact with. Null if not grounded |
Inertia is auto-calculated from the WheelController's mass and radius.
Methods
AddBrakeTorque(float torque, bool isHandbrake = false)
Adds brake torque to the wheel. The torque is multiplied by the wheel group's brake coefficient (or handbrake coefficient if isHandbrake is true). Final value is clamped to the vehicle's maximum brake torque.
ApplyRollingResistanceMultiplier(float multiplier)
Applies a multiplier to the wheel's rolling resistance torque. Values greater than 1 increase resistance, less than 1 decrease it. Useful for simulating different surface conditions.
SetWheelGroup(int wheelGroupIndex)
Sets the wheel group index for this wheel component. Determines which WheelGroup the wheel belongs to for brake distribution and differential connections.