s4m_ur4i Posted November 3, 2016 Share Posted November 3, 2016 (edited) 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. Edited November 3, 2016 by SamTheMighty further Tests made Link to comment Share on other sites More sharing options...
s4m_ur4i Posted November 3, 2016 Author Share Posted November 3, 2016 (edited) Now I am puzzled. When I speed up the "walk-speed" (velocity X) of the characters. They go through - This makes no sense... anyone? **EDIT** Does not depend on the velocity... it doesn't fix it. Edited November 5, 2016 by SamTheMighty further Tests made Link to comment Share on other sites More sharing options...
s4m_ur4i Posted November 5, 2016 Author Share Posted November 5, 2016 (edited) hope you don't mind mentioning you in this post @rich I am serious, this is a bug. I wrote a testcase so anyone can reproduce it. To run the testcase, do: 1. npm install; 2. node server.js then: http://localhost:8080/ I investigated now a few days to get sure it's not my code. The "invisible" collision caused from the floor aligned tiles varies if the characters velocity is even or uneven. I described above the way I debugged were the collision calls are coming from. There is a phaser-arcade-testing.js in it, were I modified the physics to log the tile that causes the collision; But this can also reproduced with any other phaserJS version. (I just added console.trace()) if it's even: there are other "invisible" collisions caused from the floor tiles, than by an uneven velocity. I am quite sure this is a bug in the arcade collision physics by phaser. I tested phaser 2.4, 2.5 and 2.6 regards testcase_without_node_modules.zip Edited November 5, 2016 by SamTheMighty Example files: deleted unecessary code to understand it more easy. Link to comment Share on other sites More sharing options...
Recommended Posts