Sign in to follow this  
mypel16000

Clashing Enemies

Recommended Posts

mypel16000    14

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?

Share this post


Link to post
Share on other sites
mathew_653    107

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.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this