Exemplo n.º 1
0
 public Vector3 SetDirectionLocal(Vector3 direction, Space relativeTo) //SHOULD work
 {
     if (relativeTo == Space.Self)
     {
         return(offset.ReverseRotation(Quaternion.LookRotation(direction)) * Vector3.forward);
     }
     else
     {
         return(offset.ReverseRotation(Quaternion.LookRotation(parent.InverseTransformPoint(parent.position + direction))) * Vector3.forward);
     }
 }
Exemplo n.º 2
0
 public Quaternion initialRotation(Quaternion current)
 {
     if (space == Space.Self)
     {
         return(offsetRotation.ReverseRotation(transform, current));
     }
     else
     {
         return(offsetRotation.ReverseRotation(Quaternion.Euler(Vector3.zero), current));
     }
 }