08.05.2015, 13:37
Well, it wont be easy but I thought of something quick.
Perhaps you could use OnPlayerUpdate, or any other timer you want to do per 250-300 ms, however let's move on. You check if the player is in range of the NPC, he is? Determine between the player's facing angle and the NPC's. if NPC Angle+180 = PlayerAngle. Then the player is facing the NPC. This wont work only if the player is FACING the NPC though.
Perhaps you could use OnPlayerUpdate, or any other timer you want to do per 250-300 ms, however let's move on. You check if the player is in range of the NPC, he is? Determine between the player's facing angle and the NPC's. if NPC Angle+180 = PlayerAngle. Then the player is facing the NPC. This wont work only if the player is FACING the NPC though.