WheelHit 车轮碰撞
Struct
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 wheel's forwardFriction and sidewaysFriction based on ground's material.
模拟不同地面材质的方法是查询WheelCollider获取它的碰撞信息(参考WheelCollider.GetGroundHit)。通常你可以获取车轮碰到的其他collider,并基于地面的material修改车轮的forwardFriction和sidewaysFriction。
The other members of WheelHit structure are usually queried for information purposes or special effects. E.g. a "slipping tire" sound can be played if forwardSlip or sidewaysSlip exceed some threshold.
WheelHit结构的其他成员通常查询用于信息参考之用或特定效果。例如,如果forwardSlip 或 sidewaysSlip,超过一定的阈值,播放一个轮胎刹滑动的声音。
参见:WheelCollider.GetGroundHit.
Variables变量
-
The other Collider the wheel is hitting.
车轮碰到的其他碰撞器。 -
The point of contact between the wheel and the ground.
轮胎和地面之间的接触点。 -
The normal at the point of contact.
接触点的法线。 -
The direction the wheel is pointing in.
车轮指向的方向。 -
The sideways direction of the wheel.
车轮的侧面方向。 -
The magnitude of the force being applied for the contact.
应用到接触点的力的大小。 -
Tire slip in the rolling direction. Acceleration slip is negative, braking slip is positive.
在滚动方向上的滑动,加速滑动为负,制动滑动为正。 -
Tire slip in the sideways direction.
在侧面方向上的滑动。