afdsfasdfsda Posted October 28, 2015 Share Posted October 28, 2015 I was trying to make climbable ladders in my platformer by testing if the player or any npc is in front of a ladder, but my map is scaled with the setScale() method. When I tried this:this.playerHasStairBehind = this.mapa.hasTile( escada.getTileX(this.player.x), escada.getTileY(this.player.y), escada );By the way, escada means ladder or stairs and is a scaled layer imported from the tilemap "mapa".But that code returned this error:In order to solve this, I managed this workaround:this.playerHasStairBehind = this.mapa.hasTile( escada.getTileX(this.player.x/this.mapScale), escada.getTileY(this.player.y/this.mapScale), escada );I hope I've helped someone with this post! And thanks for Phaser, it's an awesome framework! Skeptron 1 Link to comment Share on other sites More sharing options...
Skeptron Posted October 29, 2015 Share Posted October 29, 2015 You could mark your post as answered, it would be even more effective! Link to comment Share on other sites More sharing options...
afdsfasdfsda Posted October 29, 2015 Author Share Posted October 29, 2015 It's been solved, so yeah... Link to comment Share on other sites More sharing options...
Recommended Posts