WheelCollider
info
WheelCollider inherits from Component
A special collider for vehicle wheels. Unity WheelCollider
Members
Properties
Name | Description |
---|---|
WheelCollider .brakeTorque | Brake torque expressed in Newton metres. Must be positive. |
WheelCollider .center | The center of the wheel, measured in the object's local space. |
WheelCollider .forceAppPointDistance | Application point of the suspension and tire forces measured from the base of the resting wheel. |
WheelCollider .forwardFriction | Properties of tire friction in the direction the wheel is pointing in. |
WheelCollider .isGrounded | Indicates whether the wheel currently collides with something (Read Only). |
WheelCollider .mass | The mass of the wheel, expressed in kilograms. Must be larger than zero. Typical values would be in range (20,80). |
WheelCollider .motorTorque | Motor torque on the wheel axle expressed in Newton metres. Positive or negative depending on direction. |
WheelCollider .radius | The radius of the wheel, measured in local space. |
WheelCollider .rpm | Current wheel axle rotation speed, in rotations per minute (Read Only). |
WheelCollider .sidewaysFriction | Properties of tire friction in the sideways direction. |
WheelCollider .sprungMass | The mass supported by this WheelCollider. |
WheelCollider .steerAngle | Steering angle in degrees, always around the local y-axis. |
WheelCollider .suspensionDistance | Maximum extension distance of wheel suspension, measured in local space. |
WheelCollider .suspensionExpansionLimited | 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 .suspensionSpring | The parameters of wheel's suspension. The suspension attempts to reach a target position by applying a linear force and a damping force. |
WheelCollider .wheelDampingRate | The damping rate of the wheel. Must be larger than zero. |
Methods
Name | Description |
---|---|
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
Name | Description |
---|---|
WheelCollider .gameObject | The game object this component is attached to. A component is always attached to a game object. |
WheelCollider .tag | The tag of this game object. |
WheelCollider .transform | The Transform attached to this GameObject. |
WheelCollider .hideFlags | Should the object be hidden, saved with the Scene or modifiable by the user? |
WheelCollider .name | The name of the object. |
Inherited Methods
Name | Description |
---|---|
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.