Skip to content

API > WheelCollider


WheelCollider⚓︎

WheelCollider inherits from Component

A special collider for vehicle wheels. Unity WheelCollider

Members⚓︎

Properties⚓︎

Name Description
WheelCollider.brakeTorqueProperty Brake torque expressed in Newton metres. Must be positive.
WheelCollider.centerProperty The center of the wheel, measured in the object's local space.
WheelCollider.forceAppPointDistanceProperty Application point of the suspension and tire forces measured from the base of the resting wheel.
WheelCollider.forwardFrictionProperty Properties of tire friction in the direction the wheel is pointing in.
WheelCollider.isGroundedPropertyReadonly Property Indicates whether the wheel currently collides with something (Read Only).
WheelCollider.massProperty The mass of the wheel, expressed in kilograms. Must be larger than zero. Typical values would be in range (20,80).
WheelCollider.motorTorqueProperty Motor torque on the wheel axle expressed in Newton metres. Positive or negative depending on direction.
WheelCollider.radiusProperty The radius of the wheel, measured in local space.
WheelCollider.rpmPropertyReadonly Property Current wheel axle rotation speed, in rotations per minute (Read Only).
WheelCollider.sidewaysFrictionProperty Properties of tire friction in the sideways direction.
WheelCollider.sprungMassProperty The mass supported by this WheelCollider.
WheelCollider.steerAngleProperty Steering angle in degrees, always around the local y-axis.
WheelCollider.suspensionDistanceProperty Maximum extension distance of wheel suspension, measured in local space.
WheelCollider.suspensionExpansionLimitedProperty Limits the expansion velocity of the Wheel Collider's suspension. If you set this property on a Rigidbody that has several Wheel Colliders, such as a vehicle, then it affects all other Wheel Colliders on the Rigidbody.
WheelCollider.suspensionSpringProperty The parameters of wheel's suspension. The suspension attempts to reach a target position by applying a linear force and a damping force.
WheelCollider.wheelDampingRateProperty The damping rate of the wheel. Must be larger than zero.

Methods⚓︎

Name Description
WheelCollider.ConfigureVehicleSubsteps(speedThreshold, stepsBelowThreshold, stepsAboveThreshold) Method Configure vehicle sub-stepping parameters.
WheelCollider.GetGroundHit() Method Gets ground collision data for the wheel.
WheelCollider.GetWorldPose() Method Gets the world space pose of the wheel accounting for ground contact, suspension limits, steer angle, and rotation angle.
WheelCollider.ResetSprungMasses() Method Reset the sprung masses of the vehicle.

Inherited Members⚓︎

Inherited Properties⚓︎

Name Description
WheelCollider.gameObjectPropertyReadonly Property The game object this component is attached to. A component is always attached to a game object.
WheelCollider.tagPropertyReadonly Property The tag of this game object.
WheelCollider.transformPropertyReadonly Property The Transform attached to this GameObject.
WheelCollider.hideFlagsProperty Should the object be hidden, saved with the Scene or modifiable by the user?
WheelCollider.nameProperty The name of the object.

Inherited Methods⚓︎

Name Description
WheelCollider.BroadcastMessage(methodName, parameter=nil)Method Calls the method named methodName on every Lua Script in this game object or any of its children.
WheelCollider.CompareTag(tag)Method Is this game object tagged with tag ?
WheelCollider.GetAllLuaScripts()Method Returns an array of all Lua scripts that attached to the game object.
WheelCollider.GetComponent(type)Method Returns the component of Type type if the game object has one attached, nil if it doesn't.
WheelCollider.GetComponentInChildren(t)Method Returns the component of Type type in the GameObject or any of its children using depth first search.
WheelCollider.GetComponentInParent(t)Method Returns the component of Type type in the GameObject or any of its parents.
WheelCollider.GetComponents(type)Method Returns all components of Type type in the GameObject.
WheelCollider.GetComponentsInChildren(t)Method Returns all components of Type type in the GameObject or any of its children.
WheelCollider.GetComponentsInParent(t)Method Returns all components of Type type in the GameObject or any of its parents.
WheelCollider.SendMessage(methodName, value=nil)Method Calls the method named methodName on every Lua Script in this game object.
WheelCollider.SendMessageUpwards(methodName, value=nil)Method Calls the method named methodName on every LuaScript in this game object and on every ancestor of the behaviour.
WheelCollider.TryGetComponent(type)Method Gets the component of the specified type, if it exists.
WheelCollider.GetInstanceID()Method Returns the instance id of the object.

Extra Detail⚓︎

Wheel collider is used to model vehicle wheels. It simulates a spring and damper suspension setup, and uses a slip based tire friction model to calculate wheel contact forces.