Cover Generator

awesome i will check this out when i get home tonight …
also, for the player, how do i get them to use the cover??

for the human player?

yes thats correct

no idea, players normally look around and find proper places easier, brain is a very advanced non-artificial-intelligence system :smiley: I have never seen a cover system for players. why do you need it?

To be able to cover at the points created.
Much like how the AI does. I am thinking this can be used in a cover system for the player itself, and, not the AI.
So if i can tell the player “press Q, it will take appropriate cover to whatever it is you are covering next to/behind”

In the video, it looks like all the AI are using cover, then the player is able to as well.
on death, he switches to possess an AI and is able to use cover.

imo you need then to use an AIController to control the player character temporarily, then you can run the EQS in the BT… but probably possible to write a code to find nearby cover points and then evaluate them according to the direction stored, and the direction(s) of incoming attack(s), and then suggest a proper location to the player…

So this is for AI only setups, sad.

Thanks for this!

I’ve never used github before, could someone summarise how I use the various files to make the plugin please?
Also, my AI uses a prone stance as well as standing/crouched, if someone is taking this plugin further would an additional height level be difficult to implement to account for a prone height?


Thank you for your fork and update to async cover generation. I noticed when trying to package a build with the cover generator plugin, the build fails. I think it has something to do with the async use not compiling correctly when packaging.

karma4jake : thanks for the feedback! I’m using this implementation in an actual game project, that should be built in near future… can you please try it with the original plugin? it would be a great help :slight_smile: (anyway, I will try it later with a smaller project…)

May I get 4.19 version of this plugin?

Here is the plugin compiled for 4.19.2; I am not sure why it generated a huge .pch file within the plugin folder. Anyways it works, try the demo map where basic dumb AI just runs to different cover points. Just select the red covergen in the level and click on refresh points to see the debug.

Fixed huge .pch file in plugin ----> - Google Drive

If anyone is having problems with the original plugin crashing on load with a black screen in a packaged build:
Just edit the .uplugin file in a text editor and change the Type under Module at the bottom from “Developer” to “Runtime”.

Does anyone who is utilizing this plugin know the best method of using the variables from the “Coverpoint” class?
I see that the CoverGenerator can be accessed from anywhere, but I am having problems getting/setting the occupied Coverpoint class variables so that different behaviors/animations can be used in each case. I know I am doing something wrong; it seems like setting a coverpoint class variable in blackboard is throwing errors/not able to access a specific coverpoint…

I’m using it but my aiming and animation system uses tracing from actual possible body poses to target, thus independent from cover points, and more flexible because an NPC can be at a cover point but turn in an uncovered direction to shoot, when it is better to have prone position…

It works well in 4.19.2 Thanks a lot man

By the way, could you tell me how I can use “parallel to cover direction” test in EQS to make pawns choose right side of covers against their opponents? If you show me the picture of your EQS test, it would be very helpful.

The easiest way is to add a trace on visibility from the targeted enemy to the query pawn. If the trace is blocked by an object and cannot reach the query pawn then it will pick a spot that is not visible to the enemy…

Thanks for the picture. However, trace on visibility cannot solve the situation like this as you know. I think it would be better if I can access cover point variables you mentioned and apply dot test in EQS. Have you succeed in getting Cover Point generated by Cover Generator as valid one? I’m trying to find out a way…

Well I think if you lower the height of the trace from that query test it will work for low cover objects…I noticed the dot test in eqs usually ends up with the pawn getting in a locked state after a few queries for some reason, maybe I set it up wrong. I am working on a system that can utilize the different variables, I will share it if I can figure it out…may require some c++ and extending some things…

The coverpoint class doesn’t derive from a regular actor or object so referencing it…I don’t know what I am doing lol…