Page 1 of 1

[0.16.51] Unitgroup not pathfinding while center of group is on entity of own force.

Posted: Fri Dec 07, 2018 1:45 pm
by tha_snoetje
While working with unitgroups i stumbled on some strange behavior of the path finding.
The pathfinding doesn't work when the center of the group is on an entity of the same force.

How to reproduce ?
1. Create a unit group with some units
2a. Have the group center/position on a entity of its own force (example: nest or silo).
2b. Or set the group to wander, now it will sometimes wander over a nest
3. Give the group a command to move.

Some examples with debug info enabled.
The group center on the middle of the nest:
Image
The group center on a silo of the same force:
Image

Re: [0.16.51] Unitgroup not pathfinding while center of group is on entity of own force.

Posted: Fri Dec 07, 2018 2:39 pm
by Klonan
Well, the group needs to pathfind, and for that it checks collisions

No commandable entity (unit or unit-group) will path if they are in the middle of another entity

EDIT: But something could be done to fix it, so I will leave it here

Re: [0.16.51] Unitgroup not pathfinding while center of group is on entity of own force.

Posted: Fri Dec 07, 2018 3:15 pm
by tha_snoetje
If I do a "create_unit_group" on a position where an entity already is, it would be my stupid fault :) .

But what if a nest is created/spawned on the group position.
And the group is then issued a "set_command"? it fails.

Same happens for when a group wanders over an entity.

So i'm not saying that the biters need to walk on top of the a silo :D
I'm saying that when the group wanders over an entity of its own force (so by using its own wander AI, Not me forcing it there)
A "set_command" fails
Image

Re: [0.16.51] Unitgroup not pathfinding while center of group is on entity of own force.

Posted: Fri Jun 28, 2019 1:35 pm
by Oxyd
Since unit groups are kind of non-physical anyway, I suppose there's not much harm in letting them pathfind through other entities of their own force. Individual members will still have to go around the obstacles, but it should work in cases like these.

So, fixed in 0.17.53.