What is ParallaxLayer.Mirroring?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Zylann
:warning: Old Version Published before Godot 3 was released.

I recently added a Camera2D to my scene, set it as Current, and now the launched app freezes at the Godot spash screen (the window doesn’t respond so I have to kill it with the Stop button).

Going through removal of all nodes until the freeze disappears, here is what I got:

  • Root (Node)
    – ParallaxBackground
    ---- ParallaxLayer
    – Camera2D

And I noticed that ParallaxLayer.Mirroring was set to (0,-512).
I reset it to (0,0) and now the scene plays correctly.
It seems I can set positive values but once X or Y is negative, the freeze re-happens.

The GUI allowed me to set -1, but it confuses the engine, so is this a bug?

:bust_in_silhouette: Reply From: thomas_laverne

The mirroring allows to have the image repeated over and over again in a side scroller for instance. If you’re image is 512 width, the mirroring set at (0,-512) will repeat the image every to 512 pixels, which is convenient when sidescrolling instead of replicating the same sprite over and over again.