pdiddles03 Posted November 11, 2017 Share Posted November 11, 2017 I'm using tiled to set an object for a ladder, in phaser, i am using "createFromObjects" to create the object, i can perform the overlap collision in order to let the user climb, but my problem comes from when the user reaches the top, how do i detect when the user has reached the top, re enable the gravity, and not allow them to fall down? Link to comment Share on other sites More sharing options...
pdiddles03 Posted November 12, 2017 Author Share Posted November 12, 2017 Bump Link to comment Share on other sites More sharing options...
Puflo Posted November 12, 2017 Share Posted November 12, 2017 Not sure but i think you can do something like this: // update function var currentTile = map.getTile(mapLayer.getTileX(player.body.x), mapLayer.getTileY(player.body.y), mapLayer); if (currentTile.properties.isLadder && cursors.up.isDown){ player.body.velocity.y = -200; } Link to comment Share on other sites More sharing options...
Recommended Posts