What kind of steering behaviour or logic can I use to get mobiles to surround another?
Posted
by
Vaughan Hilts
on Game Development
See other posts from Game Development
or by Vaughan Hilts
Published on 2014-08-18T18:47:13Z
Indexed on
2014/08/18
22:33 UTC
Read the original article
Hit count: 409
I'm using path finding in my game to lead a mob to another player (to pursue them). This works to get them overtop of the player, but I want them to stop slightly before their destination (so picking the penultimate node works fine).
However, when multiple mobs are pursuing the mobile they sometimes "stack on top of each other". What's the best way to avoid this? I don't want to treat the mobs as opaque and blocked (because they're not, you can walk through them) but I want the mobs to have some sense of structure.
Example:
Imagine that each snake guided itself to me and should surround "Setsuna". Notice how both snakes have chosen to prong me? This is not a strict requirement; even being slightly offset is okay. But they should "surround" Setsuna.
© Game Development or respective owner