Jump to content

tilemap collision issue: how to auto correct player position


melonboy123
 Share

Recommended Posts

hello, I am making a game using phaser arcade physics engine. In the game, the player is exactly the size of a tile. The player can move freely in open space. It doesn't have to stop at the center of the tile everytime. This cause a problem. It is really hard to enter a small path of exactly one tile wide, because the player will always collide with the tile even if it is off the center for a little bit.

say the tile is 50px wide, the x coordinates of tiles are 0,50,   ,150,200. The player wants to enter at x=100. But it is actually entering from x=99. This will cause the player to be stopped.

how to ignore the small difference and auto correct the player's position, make it at x=100?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...