19.06.2015, 14:52
Hello.
How can I make functions such as:
IsPlayerBehindPlayer(player1, player2) - if the player is behind the player / looking at their back then it returns true, else false.
IsPlayerInfrontofPlayer(player1, player2) - Same as above but for the front.
Basically, I know it can be done by comparing facing angles but would they be the same? Or how else could I compare them to accurately return the desired result? Thanks for any help.
How can I make functions such as:
IsPlayerBehindPlayer(player1, player2) - if the player is behind the player / looking at their back then it returns true, else false.
IsPlayerInfrontofPlayer(player1, player2) - Same as above but for the front.
Basically, I know it can be done by comparing facing angles but would they be the same? Or how else could I compare them to accurately return the desired result? Thanks for any help.