# Generator Location context Suggestion

**URL:** <https://forums.unrealengine.com/t/generator-location-context-suggestion/1821750>\
**Category:** Feedback & Requests\
**Tags:** EQS, unreal-engine, Blueprint, CPP\
**Created:** [April 25, 2024, 9:34pm UTC](https://forums.unrealengine.com/t/generator-location-context-suggestion/1821750 "2024-04-25T21:34:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spacebares](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@spacebares](https://forums.unrealengine.com/u/spacebares)\
**Post date:** [April 25, 2024, 9:34pm UTC](https://forums.unrealengine.com/t/generator-location-context-suggestion/1821750/1 "2024-04-25T21:34:15Z")

</div>

Location only Context providers should replace “CenterActors” that most generators are looking for.  
Example the cone generator

_Line32 AIModule\Private\EnvironmentQuery\Generators\EnvQueryGenerator\_Cone.cpp_

```auto
void UEnvQueryGenerator_Cone::GenerateItems(FEnvQueryInstance& QueryInstance) const
{
	TArray<AActor*> CenterActors;
	QueryInstance.PrepareContext(CenterActor, CenterActors);

	if (CenterActors.Num() <= 0)
	{
		return;
	}
	//...
}

```

Even if you use _ProvideSingleLocation_ it is completley ignored because it is expecting _ProvideActorsSet_.

I Believe these generators should allow the use of location contexts so different types of AI with their “eyes or body parts” far away from origin can run EQS without the need of helper dummy actors attached to it just to get EQS generators to work properly…

Currently the solution is to just copy paste the entirety of the generator you want to modify just to change a few lines of code to add location support.  
Or the hacky solution of spawning in dummy actors and attaching them to respective components, keeping references to those actors, and calling the EQS generators with them as context.

Notable example of this working the way it should is the PathingGrid generator.  
We need that same behavior for cone & other shapes!
