Hi, I am trying to create a new mechanic for a horror game, where if the enemy is the view of the player, it will become hostile and attack. When designing the mechanic, my thought process was that the player camera would have a trigger as a child to it that is the same shape as the camera view, and if the pawn of the enemy entered the trigger, the event would fire, but I am having some trouble getting a trigger volume attached to the player character. I was wondering if anyone would be able to point me in the right direction, and if this type of system would not work, would anyone be able to give me some advice as to how this mechanic could be achieved?
I swear I saw a function for this somewhere.
For the life of me I can’t recall what it was called.
In any case, its would be easier to get the dot product of direction to the player compared to the direction the enemy is facing.
If that is withing a certain threshold, do a quick trace from enemy to player.
If that succeeds, the enemy has seen the player.
Thank you so much! The PawnSensing component worked!