phaser icon indicating copy to clipboard operation
phaser copied to clipboard

Add parallax properties to Tilemaps

Open tobx opened this issue 2 years ago • 0 comments

Tiled supports parallax layers. If you set the map properties Parallax Origin (X and Y) and the layer or object properties Parallax Factor (X and Y) and scroll through the map you can directly see the parallax effect. That comes in handy, because you do not need to export and import the map in phaser and load a level with it in order to test the parallax effect. The properties are stored as parallaxx and parallaxy in the exported tilemaps.

Afaik phaser does not parse those values and one does not have access to it. Currently I workaround that by adding redundant custom properties scroll-factor-x and scroll-factor-y.

It would be great, if phaser would parse those values directly.

tobx avatar Jun 13 '23 07:06 tobx