Fixed typo on collision for TileMapLayers (lesson to triple check your code...)

This commit is contained in:
Craig Whiteside 2016-06-06 15:43:51 +01:00
parent 5492ed0d64
commit 7a1667fa7e

View file

@ -254,7 +254,7 @@ Phaser.Physics.Arcade.TilemapCollision.prototype = {
else if (body.deltaX() > 0 && !body.blocked.right && tile.collideLeft && body.checkCollision.right)
{
// Body is moving RIGHT
if (tile.faceLeft && (body.right - tilemapLayer.position.y) > tile.left)
if (tile.faceLeft && (body.right - tilemapLayer.position.x) > tile.left)
{
ox = (body.right - tilemapLayer.position.x) - tile.left;