Hello! I’m working on an enemy that works like the Weeping Angels from Doctor Who (they stop moving when looking at them, and move again when no one is looking at them). I’ve followed this tutorial: https://www.youtube.com/watch?v=XUFKEJRTaGg&ab_channel=MattAspland
I want the enemy to kill the player when it touches them, but only if the player is not looking at it. How can I check if the player is or is not looking at it? Variables are not working, checking if the enemy movement is active doesn’t work either. How can I know the enemy is in the player’s viewport or not?
Hey there @JasonKorda! So if the tutorial went over well and the enemy is stopping, you only need to set a boolean to true when they are in view and false when they aren’t, and when colliding with the player, check that boolean to see if they are being looked at with a branch, if true do nothing, if false kill the player.
Though if you don’t like the perception method, and you want an alternate means of detection, you could look into using recently rendered:
Thank you! I think this gets closer to the answer I was looking for, but it’s not working for me. It returns true even when the actor is not on screen… Am I doing it wrong?
I’ve also tried “Was Actor Recently Rendered” and the result is the same
Update: I increased the pawn sensing peripheral vision angle, but I’ve the pawn sensing vision doesn’t rotate with the camera. Is there a way to make it follow the camera?
I ended up using pawn sensing and some variables, changed most of my code basically. The issue now is the pawn sensing not following the camera. It moves horizontally, but not vertically. Do you happen to know if that’s something you can edit? If not I’ll try with this new code and the “was recently rendered” again
So because the pawn type is inherited, it doesn’t seem like you can attach it under a socket. I was unaware of this limitation originally. The method Auran mentioned would be better than both in this case, and the limitation with “Recently Rendered” is that it’s based on bounds of the object and you’d have to shrink those for it not to apply from behind the player when really close.