Пример #1
0
        public static Vector3 GetDirectionAxis(Vector3 point)
        {
            int   direction = 0;
            float distance  = 0.0f;

            RagdollUtilities.GetDirection(point, out direction, out distance);
            Vector3 axis = Vector3.zero;

            if (distance > 0)
            {
                axis[direction] = 1.0f;
            }
            if (distance < 0)
            {
                axis[direction] = -1.0f;
            }

            return(axis);
        }
Пример #2
0
 public static void GetDirection(Vector3 point, out int direction, out float distance)
 {
     direction = RagdollUtilities.LargestComponent(point);
     distance  = point[direction];
 }