Behavior Designer - Cover Task

rajdpj

New member
I am currently using the behavior designer Cover task with unity and have the following questions:
1. How does the Cover task decide which side of an object (i.e. a wall) to hide behind? is it using the forward vector of the cover gameobject?
2. Does the cover object have to be a mesh? if so, should the cover be a simple mesh so that the normal is a large area?
3. The cover task does not move to next task if Max Look At Rotation Delta is zero, what is the purpose of the Max Look At Rotation Delta setting?
4. Is there any way, other than looking at the code of each task, to find a detailed explanation of the behavior designer parameters and their effects related to each tasks(i.e Cover(Max Look At Rotation Delta), etc). any response is greatly appreciated.
 
1. How does the Cover task decide which side of an object (i.e. a wall) to hide behind? is it using the forward vector of the cover gameobject?
Cover fires a raycast in a circular direction and then tries to get the position on the other side of the hit object.

2. Does the cover object have to be a mesh? if so, should the cover be a simple mesh so that the normal is a large area?
No, the raycasts hit based on colliders.

3. The cover task does not move to next task if Max Look At Rotation Delta is zero, what is the purpose of the Max Look At Rotation Delta setting?
maxLookAtRotationDelta specifies the rotation speed that the agent should move to look towards the cover point. If this is zero then the character won't be able to rotate.
4. Is there any way, other than looking at the code of each task, to find a detailed explanation of the behavior designer parameters and their effects related to each tasks(i.e Cover(Max Look At Rotation Delta), etc). any response is greatly appreciated.
Each field has a tooltip which gives an overview of what it does, but for the most complete explanation the code is the best place to look.
 
Justin,
I would like to know the best way to incorporate the cover task in the following scenarios:
1. standing still and take cover when alerted by enemy
2. while guard in cover shoot at player(animation), then change to another cover layer maybe to get closer to player then resume shooting
3. while guard patrolling to waypoints, take cover when can see object, but be able to go to another cover location if the cover location is occupied by another guard

would it be better to create behavior trees with the cover task in each tree or have the cover be an external behavior tree that is called by the other behavior trees.

I also have seen while experimenting with the cover task that it is possible for the guard and player to be on the same side(second time that the guard seeks cover), even though the guard should be seeking cover from the player? if possible, what is your recommendation of how to prevent this behavior?

any response is greatly appreciated.
 
Last edited:
That is a bit more involved than what the cover task does so I recommend writing your own task based on the cover task. This will give you the best results and is actually what I did for our (currently deprecated) Deathmatch AI Kit asset.
 
Justin,
I appreciate your time and answers. I will take a look at the DeathMatch AI kit and proceed with your suggestion. Thank you in advance for your cooperation.
 
Last edited:
Top