How to use make an AI detect light source and avoid it?
Hi, I am making an AI for a horror game and my AI will detect light source and avoid it. I have tried to search here, google and youtube. Maybe the keywords i'm searching for is not good enough that I cannot find anything about it.
Would like to know how to implement one in event graph for my AI.
asked Jan 20 '19 at 02:53 PM in Using UE4
You would need to work with collisions and traces for that.
The lights relevant to your AI should have a Sphere Collision on them, so when the AI enters its radius you begin tracing to see if there's any direct line of sight. When they leave the sphere, yo stop tracing to them.
You could do a single trace to the center, or several to different parts of your character if you need it to be more precise.
answered Jan 20 '19 at 03:25 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here