ArticulationBody.GetPointVelocity
Declaration
public Vector3 GetPointVelocity(Vector3 worldPoint);Описание
Получает скорость тела артикуляции в указанном worldPoint в глобальном пространстве.
GetPointVelocity принимает во внимание angularVelocity тела шарнира при расчете скорости.
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { public ArticulationBody ab;
void Start() { ab = GetComponent<ArticulationBody>(); }
// Get the velocity of a wheel, specified by its position in local space. Vector3 CalcWheelVelocity(Vector3 localWheelPos) { return ab.GetPointVelocity(transform.TransformPoint(localWheelPos)); } }