I have multiple platformer Npcs in the level, who move towards the player with different speeds. How do I check for each Npc if they are to close to each other - in which case, they should stop or even move back - so that they wont overlap.
Thanks :)
Hmmm... im not usally familiar, but try scaling down the npc line of sight.
i think the problem is more about not knowing how to compare values against instances of the same kind of object (?)
how do each npc find the closest (other) npc and how do i store this value ?
Develop games in your browser. Powerful, performant & highly capable.
The fix for the above is usually you create a Family with just the NPC in it, then you pick the object in question as NPC and say pick nearest Family (which is also the NPC but now a different object)