Checking if player is looking in a specific direction?
I am trying to make a horror game, and am trying to make a jumpscare class. It relies on the player facing a certain direction and triggering an event. I came up with a solution that checks the player rotation and if they're in the trigger box (Not yet implemented). I was wondering if there was an easier way or a more efficient solution as I have noticed in a lot of horror games, that a "scary" event only happens when the player faces a certain direction, or looking at a specific object.
asked Apr 22 '18 at 09:02 PM in Blueprint Scripting
You would probably be best to use player forward vector and the world position of whatever you want them to look at and get the "DOT" product of the 2 vectors will give you an angle in degrees or radians, and then you can compare this to whatever the player's field of vision would be to tell if the player can "see" the trigger event.
answered Apr 22 '18 at 09:30 PM
Nebula Games Inc
Follow this question
Once you sign in you will be able to subscribe for any updates here