Hi unreal forums! I’m looking to create an enemy similar to the weeping angels from doctor who or SCP 173 from scp containment breach, where the actor will move if they’re not being looked at, im really stuck and would appreciate any help! Thanks!
Hi,
I don’t know the reference you have mentioned, but if you simply want to know if an actor has the chance of being drawn on the Player’s screen based on it’s location (it might still be occluded by walls etc.) try this:
If you want to know if the actor is actually visible, you need to do some traces.
I took this screenshot from an older project, when a fire would only change color if the Player is not looking at it. There might be easier/more efficient solutions for this, but I’m not aware of any.
EDIT: The screenshot is form the “Fire” blueprint, so you you might use this on your ‘ShyCharacter’.
Okay! I’ll try this, hopefully it will just be this simple!
Okay! So I tried it with a simple print string and it seems to work pretty well except there’s one odd issue, For some reason it works when looking up, down and right, but when you look to the left and the actor goes off screen it still says they are in sight. But it works every other way which is kind of weird.
The -3000 hooked up to Screen Location X should be -300.
Yeah I played with the numbers a bit but the left side still doesn’t work.
The proposed solution does not take into account dynamic screen sizes.
This is the solution:
[ATTACH=JSON]{“data-align”:“none”,“data-size”:“thumb”,“data-tempid”:“temp_193342_1590540214219_362”}[/ATTACH]
https://forums.unrealengine.com/core/image/gif;base64
The viewport size returns the X and Y dimensions. if your world position exceeds those dimensions or lower than 0 (top left origin), then it is out of view.
Hook this up to a tick or timer.
hello,
Can you do more detailed,thank you!