Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void FixedUpdate() {
- Vector3 forward = transform.TransformDirection(Vector3.right);
- Vector3 toOther = target.transform.position - transform.position;
- if (Vector3.Dot(forward, toOther) < 0){print("Player is at my Left");}
- if (Vector3.Dot(forward, toOther) > 0){print("Player is at my Right");}
- }
Add Comment
Please, Sign In to add comment