Sprite Collision Bug

0 favourites
  • 8 posts
From the Asset Store
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • Hey Construct Community,

    I'm making a top-down zombie game, and the zombies follow the player. They overlap and stack on top of one another, so I added an ignored 8-directional movement to the zombies. This solved the problem, but now when they collide in large groups, some zombies will automatically be moved to a nearby position, essentially "squeezed out" of their original position, and it does not look clean.

    Any tips or links as to how to get the zombies to properly collide with one another while continuing to move towards the player?

    Thanks.

    Capx: dropbox.com/s/vresjtu7h0lhm9q/collisiontest.capx

    Note: In the .capx, run around the horde of zombies or stay behind the wall to get them compacted, and take notice of their collisions.

  • ?

  • The problem is the bullet behaviour. If you take it off and just use 8-dir, and try to manually munch zombies together, they don't jump around. I don't have an actual solution, but you'd need to use your own seeking/movement algorithm using 8-dir commands. You could ask if anyone has already done this. Or, use a different method.

  • You have a couple zombies who still have bounce of solids enabled.

    They caused that jump when objects are directly behind them and running into something.

    Click the zombie in your project tree, then set the bullet behaviour bounce of solids disabled, this should set it for all.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • blackhornet I can't use Pathfinding and 8 direction combined though?

    lennaert In my .capx all the zombies have bounce off solids disabled and the problem still occurs.

  • I must have done something different then

    capx

    edit: nvm I see it now, if the horde becomes really big, it still happens here too, it seems to happen when they turn.

  • I initially thought I fixed it with that method as well, but when there are 8+ zombies they begin to teleport to a nearby position.

  • Pathfinding won't work if you want to actively use 8-dir - it takes too long. Multiple movement behaviours typically don't play well with each other (in my experience).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)