Any way to get EQS grid points?

Hi, I’m working on a grid based game and I just started working on EQS for my pawn movement. I’m using the PathingGrid with Distance test to find all the grid points within a certain path length radius. What I’m trying to do is to store those points in an array, so that I can then check if the input location provided by the player (which is already rounded off to match the eqs grid locations) lies within that array or not. Is there any way to retrieve those points?

There is only a C++ way currently, but making it possible via blueprints is one of my top priorities, so stay tuned.

Cheers,

–mieszko

Alright, really looking forward to that. I got so excited after seeing EQS generate a perfect pathing grid space around the player. Anyways, at the moment, is it possible to check if a vector lies inside the pathing grid space through EQS? I’m sorry about too many questions, but most of the other posts and tutorials that I’ve gone through regarding EQS are about finding pawns in the vicinity and not about checking movement locations.

check if a vector lies inside the pathing grid space

Not sure what you mean there. During or past EQS running a query. If “during” then the only way to supply EQS with arbitrary vectors is EQS contexts and you’d probably need to implement a custom one to fetch what you need.

If you mean “after” getting query results from EQS then you need to give me more use-case details.

–mieszko

I meant if I could check whether a location vector lies within the pathing grid space. It doesn’t matter if it’s checked during or after the query. It can work either way.

What I intend to do is to use EQS to generate the area around the player character that it can move in one turn, say up to 600 unreal units or so. So when he clicks anywhere on the level, I want to check if it lies within the pathing grid space generated using EQS. If it is, I give the player the option to issue a movement command.

Yes using navigation path distance was my back up option, since I’m anyways getting that data beforehand to generate the path splines from pawn location to target location. I could check the distance using that as well.

As for EQS, it’s just enough for me to get the grid point data. I can compare with that as you said. Moreover with EQS point data available to me, I should be able to use it to show the navigable space to the player. With all the other methods, I would have to write separate code to handle that part.

For now, I’ll go with the nav mesh path distance. Once the EQS points are exposed in Blueprints, I’ll switch to that.

This doesn’t really fit EQS’ responsibilities. But it sounds like naive solution would be good enough here - checking if where player clicked is within specified distance from any of generated points. There’s also a bunch of easy optimizations to this approach.

Or you can use pathfinding to check if it’s within distance, or query navigation system for polygons within range and test users “click” location against that. There are many ways :slight_smile:

Hey Stormrage256. Check this out Unreal Engine 4.8 Release Notes | Unreal Engine Documentation

Go to AI changes and you will see that now you can use the Environment Querying System from Blueprints. That means that you can call the EQS from inside your BP and by doing so you can get all the results.

As you can see, you can get the Instance itself or just the Locations/Actors that were created (Hiding Spots Query Instance in the picture is an Query Instance Blackboard variable)

Make sure to:
1)chose the correct Query Template
2)chose Querier from your EnvQueryContent BP or just connect it to the AI pawn from the Event receive AI node (like i did)
3)chose Run Mode All Matching because if you chose the best you will only get one result

Also make sure to continue your logic after the query finish event because you might not get results (look at the pic)

I spend hours searching and experimenting and to be honest your post was the only one directly asking what i was looking for. So i suppose that nobody else has noted or explained how it works after the update. i also couldn’t find any reference except the changelog itself.
Am making my first stealth like game and i want the AI to be clever in the way its searching and not cheating because am aiming for a quality game as much as i can. If you need more help let me know

1 Like