Tactical pack does not work as you'd expect

blippothehippo

New member
An example with the flank behavior:


The group initially flanks as intended. Then once they've started to attack, They never go back to a flanking behavior again. They just beeline straight for the target continuously attacking. This is not flanking. Additionally, the behavior never returns TaskStatus.Success unless the target dies.

Assuming that the flank will be successful everytime and that no setup of a new flank is ever needed is not a flanking behavior working as intended.

When the flank is executed, the task should return successful.

There should also be a way to have the task fail strategically, which could be done with a timeout.

This holds true for a lot of the tactical pack behaviors:
Charge (Should return successful after an executed charge instead of when target dies, so you could do something like Charge -> Retreat -> Repeat)
Marching fire (Should return success after reaching group reaches certain distance from target,not when target is dead, timeout would be nice, but can be implemented in tree by user)
Flank (Should return success after executed flank, not when target is dead, timeout would be nice, but can be implemented in tree by user)
Surround (Should return success after executed Surround, , not when target is dead, timeout would be nice, but can be implemented in tree by user)

Defend works more like you'd expect, but it too does not have any fail condition. Of course the Defend behavior should return TaskStatus.Failure if the Defend Object dies.

If Ambush, Hold and Leapfrog are just a form of strategical search, then it should return success when it finds a target, and then go into Attack behavior using the tree.

Retreat works as expected, although assumes that the agent does not freeze in place when using an attack. Having "attackWhileRetreating" as an inspector variable would be much preferable to account for several attack types.

When reinforcements responding agents arrive they should return Success and start attacking the target. If the reinforcements requesting agent dies the reinforcement responders should return failure.

Attack I think is fine, timeout would be nice but can be implemented in tree by user.
 
Thanks for the feature requests - I have made a note of it and will take a look at it after we release the updated Behavior Designer. I have plans to completely restructure how the Tactical and Formations Pack work and this restructuring should make changes like this easier.
 
Thanks for the feature requests - I have made a note of it and will take a look at it after we release the updated Behavior Designer. I have plans to completely restructure how the Tactical and Formations Pack work and this restructuring should make changes like this easier.

Cool.

Do you have a rough ETA on that release?

Also, in almost all tasks in the movement / formation / tactical packs "SetDestination" is ran every frame. When integrating these packs against a different navigation solution this creates performance issues. I'd suggest encapsulating this in a condition that checks if the target has moved, if it moved further than a configurable recalculation distance then you run SetDestination. I am unsure if Unitys NavMeshAgent handles this in some manner that doesnt make it a performance issue but I'd say most solutions would run into this issue. Sure, its probably not noticable with 5 agents. But with many it could kill the whole games FPS.
 
No ETA - this is a major update for BD so I am making sure I take my time with it and do it right. The same will go for the formations add-on.

Regarding SetDestination, I could add a min distance parameter but from what I have seen it doesn't recompute the entire path if the destination is the same so this ends up not really being an issue.
 
Top