相对于点 relativePoint
处的刚体的速度。
计算速度时,GetRelativePointVelocity 会考虑到刚体的 angularVelocity。
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour {
public Rigidbody rb;
void Start() {
rb = GetComponent<Rigidbody>();
}
Vector3 CalcWheelVelocity(Vector3 localWheelPos) {
return rb.GetRelativePointVelocity(localWheelPos);
}
}