- #1
kolleamm
- 477
- 44
I'm trying to code a script for a character in my game. This will tell the character if the player is in front or behind them.
Basically I know the coordinates of the character and their angle of rotation (if rotated 45 deg, that is where they are looking)
Perpendicular to their angle is a line that defines the location that is out of view to them. How can I find the slope of this line with just a single point and an angle?
Thanks in advance
Basically I know the coordinates of the character and their angle of rotation (if rotated 45 deg, that is where they are looking)
Perpendicular to their angle is a line that defines the location that is out of view to them. How can I find the slope of this line with just a single point and an angle?
Thanks in advance