Flashlight should stops AI movement, then resume movement when flashlight isn't shining on them
The idea is that when the flashlight is shining on any AI, it pauses their movement until the light is no longer shining on them. I've used Line Trace to detect when its on them or not.
As you can see below. I've told The AI to Patrol then chase me unless flashlight is on and shining on him. However I've noticed that the AI only stops when you(the pawn) are directly facing it with the flashlight. The AI doesn't care when the flashlight's linetrace is behind an object. And even outputs that it is paused(stop movement) in printscreen when the flashlight is turned off but facing the AI. Very odd!
I've also posted my turn on and off blueprint for the flashlight as well in case I'm missing something obvious
asked Aug 13 '18 at 02:17 PM in Blueprint Scripting
If you turn on the debug for duration of 10 seconds on the Line Trace node, does it show the red line going through obstacles, or does it turn green at the point it hits the obstacle?
If it stays red for the entire length of the line, then it's not hitting the obstacle, and you might need to try Trace by Object Type or something instead, and feed a MakeArray of WorldStatic and one or two others into it for the collision Object Type.
answered Aug 13 '18 at 04:24 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here