📜  使网格跟随车轮对撞机统一 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:04.306000             🧑  作者: Mango

代码示例1
public WheelCollider wheelCollider;
public Transform wheelModel;

void Update()
{
    Vector3 wheelPosition;
    Quaternion wheelRotation;
    wheelCollider.GetWorldPose(out wheelPosition, out wheelRotation);
    wheelModel.position = wheelPosition;
    wheelModel.rotation = wheelRotation;
}