用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:wheelhit:wheelhit

WheelHit 轮碰撞信息

struct in UnityEngine

Description 描述

Contact information for the wheel, reported by WheelCollider.

由WheelCollider报告的车轮的碰撞信息。

Friction for the WheelCollider is computed separately from the rest of the physics, using a slip based tire friction model. This allows for more realistic behaviour, but makes wheel colliders ignore standard PhysicMaterial settings.

物理静止时分别计算的WheelCollider的摩擦力,使用一个基于轮胎摩擦力模型的滑动。这样就可以有更加真实的行为,但使车轮忽略标准的PhysicMaterial设置。

The way to simulate different ground materials is to query WheelCollider for its collision information (see WheelCollider.GetGroundHit). Usually, you get the other collider the wheel is hitting, and modify the wheel's WheelCollider.forwardFriction and WheelCollider.sidewaysFriction based on the physic material of the ground.

模拟不同地面材质的方法是获取WheelCollider的碰撞信息(参考WheelCollider.GetGroundHit)。通常你可以获取车轮碰到的其他碰撞器,并基于地面的物理材质修改车轮的WheelCollider.forwardFriction和WheelCollider.sidewaysFriction。

The other members of the WheelHit structure are usually queried for information purposes or special effects. For example, a “slipping tire” sound can be played if forwardSlip or sidewaysSlip exceed some threshold.

WheelHit结构的其他成员通常查询用于信息参考之用或特定效果。例如,如果forwardSlip 或 sidewaysSlip,超过一定的阈值,播放一个轮胎打滑的声音。

See Also: WheelCollider.GetGroundHit.

Variables 变量

colliderThe other Collider the wheel is hitting.
该车轮碰到的碰撞器。
forceThe magnitude of the force being applied for the contact.
作用到接触点的力的大小。
forwardDirThe direction the wheel is pointing in.
车轮指向的方向。
forwardSlipTire slip in the rolling direction. Acceleration slip is negative, braking slip is positive.
在滚动方向上的滑动,加速滑动为负,制动滑动为正。
normalThe normal at the point of contact.
接触点的法线。
pointThe point of contact between the wheel and the ground.
轮胎和地面之间的接触点。
sidewaysDirThe sideways direction of the wheel.
车轮的侧面方向。
sidewaysSlipTire slip in the sideways direction.
在侧面方向上的轮胎滑动。
script/unityengine/classes/wheelhit/wheelhit.txt · 最后更改: 2016/08/02 05:36 (外部编辑)