WheelCollider.GetGroundHit 获取碰撞

function GetGroundHit (out hit : WheelHit) : bool


Gets ground collision data for the wheel.


If the wheel collides with something, returns true and fills the hit structure. If the wheel is not colliding, returns false and leaves hit structure unchanged.


The reported hit is always the closest one. Because the tire friction model does not automatically respond to other PhysicMaterials, any simulation of different ground materials must be done manually by adjusting forwardFriction and sidewaysFriction based on collider's material returned here.

报告的hit总是最接近的一个,因为轮胎摩擦力模型不自动影响其他PhysicMaterial(物理材质)。任何对不同地面材质的模拟必须基于这里所返回的碰撞器材质来手动调整 forwardFrictionsidewaysFriction完成。

Page last updated: 2010-12-23