Skip to content

CVR Wheel Hub Controller

Top-level vehicle brain. Sits on the vehicle’s root Rigidbody and distributes motor torque, brake torque, and steering angle across a list of CVR Wheel Controllers. Also supports skid steering for tanks/treads, passive “parking” brake, and default car controls when driven from a CVR Seat.

Vehicle root Rigidbody. Forward speed is sampled as Vector3.Dot(transform.forward, velocity) each FixedUpdate.

List of CVR Wheel Controllers this hub drives. At Start the hub sets managingHub on each one.

Maximum motor torque per wheel. Multiplied by Torque Curve (which is sampled against the current speed factor, 0–1). Default 200.

Brake torque applied while braking. Default 200.

Forward speed cap used to compute the speed factor. Default 20.

Reverse speed cap used to compute the speed factor. Default 20.

Maximum steer angle at stationary, in degrees. Default 30.

Steer angle at max speed, in degrees — the effective range is lerped between this and Steering Range using the speed factor. Default 10.

Treat -Z as “forward”. Flips the effective forward vector and accelerate sign.

AnimationCurve sampled 0–1 against the current speed factor, multiplied into the motor torque. Default falls off from 1 at mid speed to 0 at max.

Accelerate input [-1, 1].

Brake input [0, 1].

Steering input [-1, 1].

When enabled and a CVR Seat with locked controls is occupied by the local player, the hub reads CVRInputManager.accelerate/brake/steering/handBrake.

Enables differential drive. Motor torque and brake torque are split between left and right sides instead of applied uniformly with steering.

Speed below which the skid ratio is less than 1 (soften the turn at low speeds). Default 5.

When enabled, skid steering uses braking rather than opposite torque to pull the inside track around.

When enabled, pressing forward while the vehicle moves backward (or vice versa) applies the brake instead of reverse throttle.

When enabled and no input is applied, wheels whose Is Braking flag is true receive a speed-dependent brake so the vehicle doesn’t roll downhill.

Brake torque applied when passive braking is active. Default 200.

Editor-only flag used by the inspector for debugging.

MemberDescription
GetForwardSpeed()Last sampled forward speed in m/s.
GetSpeedFactor()Current 0..1 speed factor against Max Speed Forward/Reverse.
GetGrounded()True if any managed wheel is currently grounded.
TrySetControlSeat(seat)Called by a CVR Seat to register itself as the control seat (first-come wins).
RemoveControlSeat(seat)Clears the registered control seat.
  • CVR-GameFiles/ABI.CCK.Components/CVRWheelHubController.cs