예제 #1
0
        public override Vector3 GetLocalLinearVelAtLocalPos(Vector3 p)
        {
            if (!data.IsStatic)
            {
                // First find the global velocity at the given point.

                Vector3 vel = bodyID.GetRelPointVel(p);

                // Now convert the velocity from global to local coordinates.
                vel = bodyID.BodyVectorFromWorld(vel);

                return(vel);
            }
            else
            {
                return(Vector3.Zero);
            }
        }