Specifically, I’m wondering about this piece of code:
Vector3 TargetLocation = Person2.transform.position - this.transform.position;
Quaternion TargetRotation = Quaternion.FromToRotation(transform.forward,TargetLocation);
this.transform.rotation = TargetRotation;
Why does it make you look at a target? Why does subtracting Person2’s POSITION from Person1’s POSITION give you the ROTATION make you look at a target?
Also, just to be clear, Quaternion.FromToRotation(transform.forward,x) is pretty much the same as Quaternion.LookRotation(x) , right? Thanks in advance.