Clashing Enemies

Started by
2 comments, last by ApochPiQ 11 years, 2 months ago

Hi, many of you might have been following the process of my game, and I have got very very far. I encounter a problem though. I have multiple enemies that chase the player around the screen. (2D seen from above). A big problem that I have encountered is that as you walk past them in circles, they all start coming together, and as there is no collision, they all group onto the same point and are seen as one, they all get to the same X and Y if you don't get me. Now, I can perfectly check collision, either pixel circle, bounding box or polygonal, but i don't know what to do if the collision returns true... do I make it go upwards, downwards..... Is there a way to simple revert the movement of the last frame?

Advertisement
Any reason why you posted your question twice?

I can see two possable solutions, if an enemy is collideing, apply velocity to the one to push em away from each other.

or use the enemy that is collided with and the players position to recalculate a path.

Hope i am being helpful.

Closing duplicate thread.

See original here.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

This topic is closed to new replies.

Advertisement