CVR Wheel Controller
Drives an individual WheelCollider for a vehicle-style prop or world object. It copies the configured motor/brake/steer values into the underlying wheel, and keeps the visual axle, wheel model, and contact-point transforms in sync with the wheel’s physics state. A WheelCollider is required on the same GameObject ([RequireComponent]).
Wheel inputs
Section titled “Wheel inputs”Motor Torque
Section titled “Motor Torque”Torque applied to the wheel per physics tick (Nm). Written to WheelCollider.motorTorque.
Brake Torque
Section titled “Brake Torque”Brake torque applied per tick (Nm). Written to WheelCollider.brakeTorque.
Steer Angle
Section titled “Steer Angle”Current steering angle in degrees. Written to WheelCollider.steerAngle.
Apply Minimal Holding Torque
Section titled “Apply Minimal Holding Torque”When enabled and |motorTorque| < 0.001, the brake torque is forced up to at least 1 so the wheel resists rolling while idle.
Visuals
Section titled “Visuals”View Model
Section titled “View Model”Optional Transform of the rendered wheel. Positioned and rotated to match WheelCollider.GetWorldPose each frame.
View Model Rotation Offset
Section titled “View Model Rotation Offset”Euler rotation offset applied to the view model (used to correct Maya/Blender default orientations).
Optional axle transform. Only its position is mirrored from the wheel pose.
Contact Point
Section titled “Contact Point”Optional transform placed at the wheel’s ground contact point (or the wheel position itself if the wheel is not in contact with ground).
Hub integration
Section titled “Hub integration”These properties are used by a parent CVR Wheel Hub Controller. They do not affect the wheel directly — the hub reads them when deciding how to distribute motor torque and steering.
Is Steerable
Section titled “Is Steerable”Whether the hub is allowed to set steerAngle on this wheel.
Steer Multiplier
Section titled “Steer Multiplier”Per-wheel multiplier applied to the hub’s steering. Default 1. Use negative values to mirror steering on the opposite axle.
Is Motorized
Section titled “Is Motorized”Whether the hub drives this wheel with motor torque.
Is Braking
Section titled “Is Braking”Whether the hub applies brake torque to this wheel.
Is On Left Side
Section titled “Is On Left Side”Marks this wheel as being on the left side of the vehicle. Used by skid-steering to decide which track gets the left/right torque and brake values.
Sideways Friction
Section titled “Sideways Friction”Stiffness target for sideways friction when not skid steering. Default 1.
Skid Steer Sideways Friction
Section titled “Skid Steer Sideways Friction”Stiffness target for sideways friction while skid steering; interpolated toward Sideways Friction based on speed. Default 0.2.
Managing Hub
Section titled “Managing Hub”Back-reference to the parent CVR Wheel Hub Controller that assigned this wheel. Set by the hub at Start.
Public API
Section titled “Public API”| Member | Description |
|---|---|
IsGrounded() | True if the wheel is currently touching a surface. |
GetRPM() | Current wheel RPM. |
sidewaysFrictionStiffness | Get/set property that mutates the underlying sideways WheelFrictionCurve.stiffness. |
Behaviour
Section titled “Behaviour”On Start, the wheel substeps are configured to ConfigureVehicleSubsteps(10, 5, 5) — five substeps both above and below 10 m/s, keeping the simulation stable at low speeds. Wheel pose mirroring is skipped while a managing hub’s Rigidbody is kinematic, so animation-driven vehicles don’t fight the wheel pose.
Source
Section titled “Source”CVR-GameFiles/ABI.CCK.Components/CVRWheelController.cs