- A* version: [5.4.5]
- Unity version: [6.2.13]
Hi,
I was wondering if anyone has some tips on freezing a character in place.
I keep having npc’s pushing eachother, maybe in a large scale RTS game its not a huge problem, but for my game it looks really bad.
I read on the forum a bit, could not find too much about it, or i am searching for the wrong things.
I read about local avoidance, and understand it is indeed that, LOCAL avoidance, so i quickly understood this was not an answer to my problems.
Then i read about “Attackslots” a system thats apparently usually used to solve this, but now instead of walking to an attackslot (i still need to refine the logic, but thats not the issue) theyre all just pushing against eachother, drifting off the map basically, if i dont stop them.
I removed the enemies collision with eachother in the unity physics.
In the past i worked with Unity Navmesh, i could disable the Navmesh agent, and then i was free to do whatever, i could use transform rotation/movement till pathfinding was needed again, and then enable the agent. I tried that with A* but lets just say it wasnt happy with that lol.
I thought maybe a navmesh cut, but that would also take the agent off the navmesh if i cut the unit that needs to be locked?
I also saw i could set the unit to Locked, but the tooltip said Local Avoidance would be worse then?
Then i saw something about the layers, so then i tried to switch them to Obstacle layer when they were standing still attacking, that also didnt help.
I mean it could still be something i am doing wrong, but if anyone has some advice would be greatly appreciated!