WheelCollider 车轮碰撞器
Inherits from Collider
A special collider for vehicle wheels.
用于车轮的特殊碰撞器。
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.
车轮的碰撞检测是由从自身y轴中心向下投射射线。车轮有一个半径和可以向下延长的suspensionDistance数。
The wheel is controlled with motorTorque, brakeTorque and steerAngle properties.
车轮是由motorTorque, brakeTorque 和 steerAngle属性控制。
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.
车轮碰撞器使用不同于物理引擎的一个基于滑动的摩擦力模型来计算摩擦力。这允许更加真实的行为。而且使车轮忽略标准的PhysicMaterial设置。通过改变车轮所碰到的forwardFriction和sidewaysFriction来模拟不同的道路材质。
参见:GetGroundHit 和 WheelFrictionCurve
Variables变量
-
The center of the wheel, measured in the object's local space.
车轮的中心,基于物体的自身坐标空间。 -
The radius of the wheel, measured in local space.
车轮的半径,基于物体的自身坐标空间。 -
Maximum extension distance of wheel suspension, measured in local space.
车轮悬挂的最大延长距离,基于自身坐标空间。 -
The parameters of wheel's suspension. The suspension attempts to reach a target position
车轮悬挂的参数。通过添加弹簧和阻尼力,悬挂试图达到目标位置。 -
The mass of the wheel. Must be larger than zero.
车轮的质量。这个值必须大于0。 -
Properties of tire friction in the direction the wheel is pointing in.
在车轮指向方向上的摩擦力的属性。 -
Properties of tire friction in the sideways direction.
轮胎侧面方向上的摩擦力的属性。 -
Motor torque on the wheel axle. Positive or negative depending on direction.
在轮轴上的电机力矩。根据方向正或负。 -
Brake torque. Must be positive.
刹车的力矩。这个值必须为正。 -
Steering angle in degrees, always around the local y-axis.
转向角度,总是围绕自身y轴。 -
Indicates whether the wheel currently collides with something (Read Only).
表示车轮当前是否碰到什么(只读)。 -
Current wheel axle rotation speed, in rotations per minute (Read Only).
当前轮轴旋转速度,每分钟转速(只读)。
Functions函数
-
Gets ground collision data for the wheel.
Inherited members继承成员
Inherited Variables继承变量
-
Enabled Colliders will collide with other colliders, disabled Colliders won't.
启用碰撞器将会碰撞其他碰撞器,禁用碰撞器就不会碰撞其他碰撞器。 -
The rigidbody the collider is attached to.
碰撞器附加的刚体。 -
Is the collider a trigger?
碰撞器是一个触发器? (是否可以穿越) -
The material used by the collider.
撞器使用的材质。 -
The shared physic material of this collider.
碰撞器的共享物理材质。 -
The world space bounding volume of the collider.
碰撞器在世界坐标空间的边界框。
-
The Transform attached to this GameObject (null if there is none attached).
Transform附加到GameObject(游戏物体)(如无附加则为空)。 -
The Rigidbody attached to this GameObject (null if there is none attached).
Rigidbody附加到GameObject(游戏物体)(如无附加则为空)。 -
The Camera attached to this GameObject (null if there is none attached).
Camera附加到GameObject(游戏物体)(如无附加则为空)。 -
The Light attached to this GameObject (null if there is none attached).
Light附加到GameObject(游戏物体)(如无附加则为空)。 -
The Animation attached to this GameObject (null if there is none attached).
Animation附加到GameObject(游戏物体)(如无附加则为空)。 -
The ConstantForce attached to this GameObject (null if there is none attached).
ConstantForce附加到GameObject(游戏物体)(如无附加则为空)。 -
The Renderer attached to this GameObject (null if there is none attached).
Renderer附加到GameObject(游戏物体)(如无附加则为空)。 -
The AudioSource attached to this GameObject (null if there is none attached).
AudioSource附加到GameObject(游戏物体)(如无附加则为空)。 -
The GUIText attached to this GameObject (null if there is none attached).
GUIText附加到GameObject(游戏物体)(如无附加则为空)。 -
The NetworkView attached to this GameObject (Read Only). (null if there is none attached)
NetworkView附加到GameObject(游戏物体)(只读)(如无附加则为空)。 -
The GUITexture attached to this GameObject (Read Only). (null if there is none attached)
GUITexture附加到GameObject(游戏物体)(只读)(如无附加则为空)。 -
The Collider attached to this GameObject (null if there is none attached).
Collider附加到GameObject(游戏物体)(如无附加则为空)。 -
The HingeJoint attached to this GameObject (null if there is none attached).
HingeJoint附加到GameObject(游戏物体)(如无附加则为空)。 -
The ParticleEmitter attached to this GameObject (null if there is none attached).
ParticleEmitter附加到GameObject(游戏物体)(如无附加则为空)。 -
The game object this component is attached to. A component is always attached to a game object.
组件附加的游戏物体。一个组件总是被附加到一个游戏物体。 -
The tag of this game object.
游戏物体的标签。
-
The name of the object. //物体的名字
-
Should the object be hidden, saved with the scene or modifiable by the user?
物体是否被隐藏、保存在场景中或被用户修改?
Inherited Functions继承函数
-
The closest point to the bounding box of the attached collider.
到附加碰撞器的边界框最近的点。 -
Casts a Ray that ignores all Colliders except this one.
投射一个光线(Ray),它忽略所有碰撞器,除了这个。
-
Returns the component of Type type if the game object has one attached, null if it doesn't.
如果游戏物体有一个附加,则返回Type类型的组件,如果没有则为null。 -
-
Returns the component with name type if the game object has one attached, null if it doesn't.
如果游戏物体有一个附加,则返回名字类型组件,如果没有则为null。 -
Returns the component of Type type in the GameObject or any of its children using depth first search.
返回Type类型组件,在GameObject或它的任何子物体使用深度优先搜索,仅返回激活的组件。 -
-
Returns all components of Type type in the GameObject or any of its children.
在GameObject或任何它的子物体,返回全部Type类型组件 -
-
Returns all components of Type type in the GameObject.
在游戏物体返回全部Type类型组件。 -
-
Is this game object tagged tag?
游戏物体有被标记标签么? -
Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour
在游戏物体每一个MonoBehaviour和每一个behaviour的祖先上调用名为methodName的方法。 -
Calls the method named methodName on every MonoBehaviour in this game object.
在游戏物体每一个MonoBehaviour上调用名为methodName的方法。 -
Calls the method named methodName on every MonoBehaviour in this game object or any of its children.
在游戏物体每一个MonoBehaviour和它的全部子物体上调用名为methodName的方法。
-
Returns the instance id of the object.
返回物体的实例ID -
Returns the name of the game object.
返回游戏物体的名称。
Messages Sent发送消息
-
OnTriggerEnter is called when the Collider other enters the trigger.
当碰撞器other进入触发器时OnTriggerEnter被调用。 -
OnTriggerExit is called when the Collider other has stopped touching the trigger.
当碰撞器other停止触动触发器时,OnTriggerExit被调用。 -
OnTriggerStay is called almost all the frames for every Collider other that is touching the trigger.
每个碰撞器other触动触发器,几乎在所有的帧OnTriggerStay被调用。 -
OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider.
当collider/rigidbody开始触动另一个rigidbody/collider时OnCollisionEnter被调用。 -
OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider.
当 collider/rigidbody停止触动另一个 rigidbody/collider时,OnCollisionExit被调用。 -
OnCollisionStay is called once per frame for every collider/rigidbody that is touching rigidbody/collider.
每个collider/rigidbody触动rigidbody/collider,将在每帧调用OnCollisionStay。通俗的说,
Inherited Class Functions继承类函数
-
Does the object exist?
物体是否存在? -
Clones the object original and returns the clone.
克隆原始物体,并返回克隆的物体 -
-
Removes a gameobject, component or asset.
删除一个游戏物体、组件或资源 -
Destroys the object obj immediately. It is strongly recommended to use Destroy instead.
立即销毁物体obj,强烈建议使用Destroy代替。 -
Returns a list of all active loaded objects of Type type.
返回Type类型的所有激活的加载的物体列表 -
Returns the first active loaded object of Type type.
返回Type类型第一个激活的加载的物体。 -
Compares if two objects refer to the same
比较如果两个物体相同 -
Compares if two objects refer to a different object
比较如果两个物体不同 -
Makes the object target not be destroyed automatically when loading a new scene.
加载新场景的时候使目标物体不被自动销毁。