Push back rectangle where collision happens
- by Tifa
I have a tile collision on a game I am creating but the problem is once a collision happens for example a collision happens in right side my sprite cant move to up and bottom :( thats because i set the speed to 0. I thinks its wrong. here is my code:
int startX, startY, endX, endY;
float pushx = 0,pushy = 0;
// move player
…