EQS trace from actor

How would I create an environment query that attempts to break line of sight from an actor (or pawn). I know I need to have a trace from the actor I’m trying to escape, but I can’t see how to trace from anything other than the actor that’s running the query.

Any ideas?

Hi ,

How do you have your EQS set up so far? What type of Generator are you using? I would suggest using an ActorsOfClass generator that has “Seached Actor Class” set to the BP you want to trace to and then a Trace filter.

The Trace filter will be set to draw a trace from the AI making the query to the BPs you searched for.

Here’s an example of an EQS I made that a Hunter AI uses to find Chickens:

Let me know if that helps you at all or if you have any questions.

Hey, sorry for the late reply and thanks for the answer. I suppose I didn’t word my question very well, but I was looking for a way to test visibility that starts from a pawn that isn’t the pawn running the behavior tree.

So my ai wants to hide from the player, so I’m looking for points that the player can’t see.

Am I explaining myself well or do I just sound a bit thick?

You are making perfect sense and there is a way to do that.

Create a new Blueprint that is based on EnvQueryContext. This blueprint is called a “Context” blueprint and can be used to tell your EQS what to generate around. When you open up the Context blueprint it will be rather devoid of content, but it has 4 functions in the My Blueprint tab. Open the “Provide Actors Set” function and in it add a “get all actors of class” between the input/output nodes. Set the class to whatever you want the AI to avoid.

Here’s an example:

Next, open the EQS and in the Trace filter, set the Context to the one you made. Now the generator will know it should test trace from that Context ( you will notice the default is “querier”.

I would recommend the generator be a Pathing Grid. Also, double check that you have set your generator’s distance to something large (ex. 3000) and the density to something manageable (ex. 250). You will have to play with the settings until you get something you like.

We do have some documentation for EQS on the way, but since this is experimental and will change a lot, it has not yet been finished.

Let me know if that helps you or if you have any other questions

Fantastic. Thanks a lot!

I’m curious, have you tried working with this for UE 4.8.1? I can’t seem to query the player character in the eyes of the bot. I have my AI chasing me, but even when the line of sight breaks, it continues to follow. I must’ve screwed something up.