Guest User

Untitled

a guest
Dec 11th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.31 KB | None | 0 0
  1.     void FixedUpdate() {
  2.  
  3.         Vector3 forward = transform.TransformDirection(Vector3.right);
  4.         Vector3 toOther = target.transform.position - transform.position;
  5.         if (Vector3.Dot(forward, toOther) < 0){print("Player is at my Left");}
  6.         if (Vector3.Dot(forward, toOther) > 0){print("Player is at my Right");}
  7.     }
Add Comment
Please, Sign In to add comment