EQS Custom Start Location for Trace

Hi,
Is there a way of customizing where an EQS trace starts from? I am using PathingGrid EQS node with Trace test.

I want to trace from an enemies gun to the player (not directly from the Querier/ Enemy) as there is a width offset from the gun to the enemies root.

You should be able to define this via the EQS context. Make a new EQSContext blueprint, do a function override on the context and you can choose whatever you like as the context.

Ok, I have provided it with the querior location vector as the gun’s front socket (it is getting the sockets location fine) via the overridden ‘Set Locations Set’ function inside a custom context and I am using this for the Trace source.

Is there a way of visualising the EQS line trace from the gun so I can see if the trace is starting from the correct place and updating correctly?

Will the trace start point update when the enemy rotates to face the player (using Focus)? (The gun is attached to the enemy via socket)

Sort of, once you have your eqs running in game you can enable the gameplay debugger (’ key) and enable eqs debugging (num 4 i think), it will give you the full eqs line trace result, which wont look like a standard trace, but should prove the result

Thanks for your time, the eqs line trace seems to be following the AI perception trace (i.e. the trace originates from the character and not the gun) and is not going from the enemy gun barrel to the player despite providing the correct actor set. (I also tired using the gun’s barrel socket for the Providing a location set with the same outcome).

eqs linetrace issue

Custom environmental query context for the gun (being used in trace as seen in the above linked image)

I ‘believe’ I fixed the issue. Thanks for the help Daniel.

→ It’s seems one cannot have a custom start point for the trace (when you feed it a context, it is always querier to context or reverse). This means one cannot get it to start from a child actor (the ai’s gun) as it would go from the querier (the AI) to/from its gun, which is of no use.

Alternatives would be to:

  1. Implement a custom EQS test or EQS Generator and manage a custom trace from there.
  2. change the gun from actor to character and implement an EQS test from the player character to the gun. (Wanted to avoid added more eqs tasks).
  3. do below:

For me I had to:

  1. reduced the radius of the sphere collision on my bullets (to try to match the trace better). I kept the bullet mesh the same size. This seemingly removed the angle at which the bullets would be blocked by the corner of a wall. It has had no effect on the hit rate of the projectile.

  2. I used an animation that reduced the angle descrepancy between the players rotation and the guns rotation/ location.

  3. For the Query I ended up using just the player ref to target for the eqs line trace.

  4. I used the below Test:

The above seemingly removed the issue I was having with the projectile.

I also added 2 traces to ensure the Query and Move to node only ran when they needed to:

  1. the first to make sure it doesn’t keep generating new spots (that the AI would normally cycle through if there are 2 or greater locations sharing the same score) when the current will allow for the AIs projectiles to hit their target.

  2. the second was to make sure it would only move if the next data was a different location (expensive move nodes) and the next location would allow for the projectile to hit its target (trace from new location to target). The new location doesn’t seem to fail this check, but it is just a fail safe.