When a tilemap layer's fixedToCamera property is false, Arcade Physics works with offset tile maps, and everything looks okay as long as the camera isn't moved.
Support this in Arcade Slopes by passing through the tilemap layer to collision solvers.
A note on Phaser's tilemap layers:
Phaser's TilemapLayer implementation does thoroughly contradicts the fixedToCamera property with lines like these in its postUpdate() and _render* methods:
So no matter where the TilemapLayer sprite is positioned, it will always scroll tiles with the camera. There is no way to override this without changing these methods.
This can be fixed by introducing a separation between the TilemapLayer's sprite position and its scrolling position, which will also help to fix mismatched collision as soon as the camera moves.
When a tilemap layer's
fixedToCamera
property is false, Arcade Physics works with offset tile maps, and everything looks okay as long as the camera isn't moved.Support this in Arcade Slopes by passing through the tilemap layer to collision solvers.
A note on Phaser's tilemap layers:
Phaser's TilemapLayer implementation does thoroughly contradicts the
fixedToCamera
property with lines like these in itspostUpdate()
and_render*
methods:So no matter where the TilemapLayer sprite is positioned, it will always scroll tiles with the camera. There is no way to override this without changing these methods.
This can be fixed by introducing a separation between the TilemapLayer's sprite position and its scrolling position, which will also help to fix mismatched collision as soon as the camera moves.