Skip to main content

WheelCollider

info

WheelCollider inherits from Component

A special collider for vehicle wheels. Unity WheelCollider

Members

Properties

NameDescription
WheelCollider.brakeTorqueBrake torque expressed in Newton metres. Must be positive.
WheelCollider.centerThe center of the wheel, measured in the object's local space.
WheelCollider.forceAppPointDistanceApplication point of the suspension and tire forces measured from the base of the resting wheel.
WheelCollider.forwardFrictionProperties of tire friction in the direction the wheel is pointing in.
WheelCollider.isGroundedIndicates whether the wheel currently collides with something (Read Only).
WheelCollider.massThe mass of the wheel, expressed in kilograms. Must be larger than zero. Typical values would be in range (20,80).
WheelCollider.motorTorqueMotor torque on the wheel axle expressed in Newton metres. Positive or negative depending on direction.
WheelCollider.radiusThe radius of the wheel, measured in local space.
WheelCollider.rpmCurrent wheel axle rotation speed, in rotations per minute (Read Only).
WheelCollider.sidewaysFrictionProperties of tire friction in the sideways direction.
WheelCollider.sprungMassThe mass supported by this WheelCollider.
WheelCollider.steerAngleSteering angle in degrees, always around the local y-axis.
WheelCollider.suspensionDistanceMaximum extension distance of wheel suspension, measured in local space.
WheelCollider.suspensionExpansionLimitedLimits 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.suspensionSpringThe parameters of wheel's suspension. The suspension attempts to reach a target position by applying a linear force and a damping force.
WheelCollider.wheelDampingRateThe damping rate of the wheel. Must be larger than zero.

Methods

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

Inherited Members

Inherited Properties

NameDescription
WheelCollider.gameObjectThe game object this component is attached to. A component is always attached to a game object.
WheelCollider.tagThe tag of this game object.
WheelCollider.transformThe Transform attached to this GameObject.
WheelCollider.hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
WheelCollider.nameThe name of the object.

Inherited Methods

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