SFML tilemap collision
问题 I'm making a 2D game in SFML and I'm trying to figure out how to collide with tiles in a tilemap. I've written some code but the problem is that I get stuck in the tile I'm colliding with as you can see in the picture below. I cannot move in any direction and around 5 pixels of the player is in the wall. This is my collision / movement code void Player::update(float delta, std::vector<Tile>& tiles) { canMove = true; for (int i = 0; i < tiles.size(); i++) { if (Collision::PixelPerfectTest