Scripting API

WheelCollider

class in UnityEngine · UnityEngine.VehiclesModule · inherits from Collider

22 of 22 of Unity's membersUnity's documentation
In Tassix

A wheel on a Rigidbody: a ray down the suspension finds the ground, a spring and damper hold the body up (at rest the wheel sits at the spring's target, as the spring carries the wheel's sprung mass there), and the tire pushes along the ground by how much it slips, through the friction curves times its load. The wheel spins by its motor and brake torques, the tire's pull and its damping. The wheel has no shape: it doesn't collide. Forces are applied each physics step, just before the simulation.

Properties 17

float brakeTorque { get; set; }
Vector3 center { get; set; }
float forceAppPointDistance { get; set; }
WheelFrictionCurve forwardFriction { get; set; }
bool isGrounded { get; }
float mass { get; set; }
float motorTorque { get; set; }
float radius { get; set; }
float rotationSpeed { get; set; }

Degrees per second.

float rpm { get; }
WheelFrictionCurve sidewaysFriction { get; set; }
float sprungMass { get; set; }

The share of the body's mass this wheel carries: the shares of all the body's wheels add up to its mass and balance about its center of mass (the smallest such shares, so equal for a symmetric car).

float steerAngle { get; set; }

Degrees about the wheel's up axis.

float suspensionDistance { get; set; }
bool suspensionExpansionLimited { get; set; }
JointSpring suspensionSpring { get; set; }
float wheelDampingRate { get; set; }

Methods 4

void ConfigureVehicleSubsteps(float speedThreshold, int stepsBelowThreshold, int stepsAboveThreshold)
bool GetGroundHit(out WheelHit hit)
void GetWorldPose(out Vector3 pos, out Quaternion quat)
void ResetSprungMasses()

Checked against Unity

Conformance scenarios that exercise it, recorded in Unity and compared event by event.