zxxz Posted March 19, 2014 Share Posted March 19, 2014 Hello, I have nearly finished a platform game I have made in Phaser. The game runs mostly fine, however sometimes when the state is changed to a new level and the player sprite is created, it falls through the floor tile, hence losing a life and restarting the level. I'm not sure why this is and it doesn't happen very often but does occasionally which seems odd. I would be grateful for any info as to what might be causing this. Cheers! Link to comment Share on other sites More sharing options...
rich Posted March 19, 2014 Share Posted March 19, 2014 Does the Sprite start out standing perfectly on the top of a tile? Link to comment Share on other sites More sharing options...
zxxz Posted March 19, 2014 Author Share Posted March 19, 2014 No I have it dropping from about 5 pixels or so above the tile onto the tile. Could this be why it is happening? Link to comment Share on other sites More sharing options...
rich Posted March 19, 2014 Share Posted March 19, 2014 Probably not, I expect it's a separation issue. What size is your player and tiles? Link to comment Share on other sites More sharing options...
zxxz Posted March 19, 2014 Author Share Posted March 19, 2014 The tiles are 32 x 32 pixels. The sprite is 61 x 64 pixels. Link to comment Share on other sites More sharing options...
zxxz Posted March 19, 2014 Author Share Posted March 19, 2014 Oh but I have changed the body of the sprite if that makes any difference? player.body.setSize(22, 60, 0, 0); Link to comment Share on other sites More sharing options...
Recommended Posts