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?
Members - Reputation: 106
Posted 24 January 2013 - 06:02 PM
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.