Exemple #1
0
        public static Axis GetAxisToDirection(Transform t, Vector3 direction)
        {
            Vector3 axisVectorToDirection = AxisTools.GetAxisVectorToDirection(t, direction);

            if (axisVectorToDirection == Vector3.right)
            {
                return(Axis.X);
            }
            if (axisVectorToDirection == Vector3.up)
            {
                return(Axis.Y);
            }
            return(Axis.Z);
        }
Exemple #2
0
 public static Vector3 GetAxisVectorToPoint(Transform t, Vector3 worldPosition)
 {
     return(AxisTools.GetAxisVectorToDirection(t, worldPosition - t.position));
 }