Search the Community
Showing results for tags 'floor tile collision'.
-
After half a day of debugging, I am quite sure the issue is not in my code since it comes directly out of Phaser. I attached a screenshot. The characters collide at the green C marked position. But there is nothing to collide with. The <obj>.body.blocked.left property is set to true >> so they are colliding left This shouldn't be possible. Since there is no object (green mark C) So I debugged the Phaser functions for collision. The call comes out of: https://github.com/photonstorm/phaser/blob/v2.6.2/src/physics/arcade/TilemapCollision.js#L356 (thanks to @Claudiovc ) processTileSeparationX is called from: https://github.com/photonstorm/phaser/blob/v2.6.2/src/physics/arcade/TilemapCollision.js#L242 were I passed in the >tile< parameter to processTileSeparationX and logged it. You can see that in the console window in the screenshot. The data on this tile shows that the ground-tiles are causing the <obj>.body.blocked.left = true. This Tile is marked red T. This is a possible bug. I also tested all the tile data, which you can see is on debug mode. Every tile (debug mode) aligns on the same pixel on the Y axis. So there is no "step" in it. The reason to assume it is a bug is that the collision on the left is called not <obj>.body.blocked.down Any further thoughts or already investigations on that - or am I completely wrong regards **EDIT** You can also test this with collision enabled only for top / bottom, then the floor tiles wont fire the collision. So I assume this is indeed some issue with the collision detection within phaser.
- 2 replies
-
- floor tile collision
- body.blocked.
- (and 3 more)