maybe my brain's just too tired, but I can't find how to make this work properly (see capx).
Basically, I'm trying to select one or several units, then have them pathfind their way to the touch/pointer. Very classic.
Thing is :
* I do not use a selection box : every unit is selected when passing the finger/pointer over it. That part works just fine and I like it.
* And, my units are in a family called "UNITS", which has a family pathfinding behaviour, but they are also in a family called "SELECTABLE" (among with buildings, etc.), which has the "is selected" boolean variable. Meaning I don't select units directly : I select selectable objects, and if those happen to also be units, then they will move on click as units should.
The issues I'm facing are :
1. The selection rectangle that marks when an object is selected doesn't always follow the object when it moves (it seems to stick to the object only if it was the first one that was selected or something)
2. No unit will move unless the unit with the lowest UID is selected. And then, they will move even if they are not selected themselves.
I feel like it all has something to do with instance picking between families, but I'm really at a loss about what to do to solve it. Unless maybe I remove the bigger "SELECTABLE" family and have the game select every family of objects separately, but that would suck.
Thanks in advance if anyone can help.