Cover Generator

Well, I already set trace height of the trace as 50. The character on the right side of the picture thinks he is not visible from the left character, since his trace test hits the cover laying in front of the left character.
Why don’t you try parallel to cover direction test? Set “EQS_GetTargetActorsSameClass” as its context and play around with epsilon value(maybe 0.1 to 1 not 0). In my case, AI characters find out right side of covers against their target pawns. Though they don’t react smoothly if their target pawns move to their flank, I think it works better than AI Behavior Toolkit’s default shooter EQS AI.

Hello, try using a TraceDistance test in your query, set it to something like 2m towards your player context. That should filter out those cover points as it won’t hit anything in that direction.

The query will return a cover point if found, just make an Object Blackboard key and set that on your query node. You can then check it in subsequent tasks and access all the info from it.

Hope that helps.

Hi, did somebody convert this on ue4 4.20.3? I am struggling on linker error…

Been a while since I had the time to open UE4, but finally updated the plugin for 4.21 and merged the PR from @sivan with the async generation of the covers.

On windows 10, with 4.21.2 - This is not recognized as a plugin.

First of all thank you a lot for this amazing plugin it really helped me a lot <3

I want to report that in the new version 4.21 the plugin makes the editor crashes a lot of times in random times in the process of generating covers points

Crash Report:


Access violation - code c0000005 (first/second chance not available)

UE4Editor_CoverGenerator!TOctree<FCoverPointOctreeElement,FCoverPointOctreeSemantics>::TConstElementBoxIterator<TInlineAllocator<99,FDefaultAllocator> >::AdvanceToNextIntersectingElement() [f:\unreal engine\ue_4.21\engine\source\runtime\engine\public\genericoctree.h:638]
UE4Editor_CoverGenerator!ACoverGenerator::GetCoverWithinBounds() [e:\unreal engine projects\mygame\plugins\covergenerator-ue4-master\source\covergenerator\private\covergenerator.cpp:609]
UE4Editor_CoverGenerator!ACoverGenerator::Tick() [e:\unreal engine projects\mygame\plugins\covergenerator-ue4-master\source\covergenerator\private\covergenerator.cpp:93]
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll

If you have got free time please check it out, thank you!

*Edit: I’ve noticed that this crash only happens when “Debug Draw All Points” is checked, so I think that it’s not gonna affect the final game that much (I wish…)

Wow this looks fantastic! my project is already 4.22 but I am in the process of doing enemy AI. will keep tabs on this and give feedback when its 4.22. Cant wait! Cheers!

Any chance on a 4.22 update? @Deams

How do you update this plugin for 4.23? I tried rebuilding from launch with failure, then tried VS2017 and clean/building but get errors about “runtime/engine/public/genericoctree.h” not being found?

I’m not versed in C+ though.

Sorry for trouble or if stupid question.

I’m working on another project intensively, but planning to use it in a new one soon, so I’ll try to upgrade it, but still on 4.22…

Ah, I fixed it by going into the cover class, and changing the line “runtime/engine/public/genericoctree.h” to “runtime/core/public/math/genericoctree.h”. Compiled correctly now.

I assume the newer engine version changed the location of some of the classes (in this case generic octree)?

greetings could you update to 4.22

could you update to 4.22 and thanks

From time to time I get this Error that crashes the Editor when I start running the game



Assertion failed: !IsGarbageCollecting() [File: D:/Build/++UE4+Licensee/Sync/Engine/Source/Runtime/CoreUObject/Private/UObject/UObjectGlobals.cpp] [Line: 2286] Unable to create new object: CoverPoint /Engine/Transient.None. Creating UObjects while Collecting Garbage is not allowed!

UE4Editor_Core
UE4Editor_Core
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoverGenerator!ACoverGenerator::IsValidCoverPoint() [e:\unreal engine projects\mygame\plugins\covergenerator-ue4-master\source\covergenerator\private\covergenerator.cpp:376]
UE4Editor_CoverGenerator!ACoverGenerator::TestAndAddPoint() [e:\unreal engine projects\mygame\plugins\covergenerator-ue4-master\source\covergenerator\private\covergenerator.cpp:417]
UE4Editor_CoverGenerator!ACoverGenerator::AnalizeMeshData() [e:\unreal engine projects\mygame\plugins\covergenerator-ue4-master\source\covergenerator\private\covergenerator.cpp:510]
UE4Editor_CoverGenerator!FGenerateCoversAsyncTask:: DoWork() [e:\unreal engine projects\mygame\plugins\covergenerator-ue4-master\source\covergenerator\private\generatecoversasync.cpp:17]
UE4Editor_CoverGenerator!FAutoDeleteAsyncTask<FGenerateCoversAsyncTask>:: DoWork() [f:\unreal engine\ue_4.25\engine\source\runtime\core\public\async\asyncwork.h:100]
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
kernel32
ntdll


I think that the main problem here is that sometimes the Cover Generates Objects while Garbage is being Collected.
Anyone knows how to fix this?

Is it possible to get a 4.24 version?

cheers

Somebody has raised a Pull Request with the 4.26 code (originally raised for 4.25 but it works for both):

One caveat: the change makes CoverGenerator into an AInfo. This means it can’t be subclassed (as per the repo README; at least this is what I found), and instead the CoverGenerator should just directly be dragged into the world as an actor, dragging from the C++ folder.

I think the original maintainer is gone, so it would be good if someone else could pick up ownership of this. For now, the best approach seems for people to share code updates via PRs against the original repo.

I have merged the pull request for 4.25/4.26
Haven’t had much time to spend on this project lately. I worked on a more elegant version a while back, hopefully I will find the time to finish it up and push it live.

How do I add this to my engine ?please any help

Any update on this?