Version: 2017.3

WheelCollider

class in UnityEngine

/

Inherits from:Collider

Switch to Manual

Description

Специальный коллайдер для колес транспортных средств.

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.

Wheel's collision detection is performed by casting a ray from center downwards the local y-axis. The wheel has a radius and can extend downwards by suspensionDistance amount.

The wheel is controlled with motorTorque, brakeTorque and steerAngle properties.

Wheel collider computes friction separately from the rest of physics engine, using a slip based friction model. This allows for more realistic behaviour, but makes wheel colliders ignore standard PhysicMaterial settings. Simulation of different road materials is done by changing the forwardFriction and sidewaysFriction based on what material the wheel is hitting. See Also: GetGroundHit and WheelFrictionCurve.

Variables

brakeTorqueBrake torque expressed in Newton metres.
centerЦентр колеса, измеряется в локальном пространстве объекта.
forceAppPointDistanceApplication point of the suspension and tire forces measured from the base of the resting wheel.
forwardFrictionProperties of tire friction in the direction the wheel is pointing in.
isGroundedIndicates whether the wheel currently collides with something (Read Only).
massThe mass of the wheel, expressed in kilograms. Must be larger than zero. Typical values would be in range (20,80).
motorTorqueMotor torque on the wheel axle expressed in Newton metres. Positive or negative depending on direction.
radiusРадиус колеса, измеряется в локальном постранстве.
rpmCurrent wheel axle rotation speed, in rotations per minute (Read Only).
sidewaysFrictionProperties of tire friction in the sideways direction.
sprungMassThe mass supported by this WheelCollider.
steerAngleУгол поворота в градусах, всегда вращается в локальной оси-у.
suspensionDistanceMaximum extension distance of wheel suspension, measured in local space.
suspensionSpringThe parameters of wheel's suspension. The suspension attempts to reach a target position by applying a linear force and a damping force.
wheelDampingRateМасса колеса. Должна быть больше нуля.

Public Functions

ConfigureVehicleSubstepsConfigure vehicle sub-stepping parameters.
GetGroundHitПолучает данные о столкновении колеса с поверхностью.
GetWorldPoseGets the world space pose of the wheel accounting for ground contact, suspension limits, steer angle, and rotation angle (angles in degrees).

Inherited members

Variables

attachedRigidbodyRigidbody к которому присоединен коллайдер.
boundsОграниченный обьем коллайдера в мировых координатах.
contactOffsetОграниченный обьем коллайдера в мировых координатах.
enabledEnabled Colliders will collide with other Colliders, disabled Colliders won't.
isTriggerЯвляется ли коллайдер триггером?
materialМатериал, используемый коллайдером.
sharedMaterialОбщий физический материал данного коллайдера.