Open qaptoR opened 1 year ago
This bug is also present in godot 3.5.3.stable.mono.
Confirmed bug in 3.6RC1
Parallax layer with NO mirroring.
Parallax layer with X mirroring applied (no other changes).
The Godot sprite has a z-index of 1000 and therefore should be drawn above the parallax layers.
Moving the Godot sprite to bottom of tree puts it back on top.
Workaround is to simply manually duplicate and contiguously place the background sprite under the parallax layer instead of relying on motion_mirror, and leave motion_mirror at zero for all layers. Node z-order is then respected.
Working for both ParallaxLayer
and Parallax2D
in 4.3. We draw the repeats differently now, so it respects z-index and scene order.
Godot version
4.0 Stable and 4.0.1-rc2
System information
Windows 10, Forward+, Nvidia 3090 v 531.29
Issue description
When using motion_mirroring for a ParallaxLayer, the only draw ordering which the Texture2D respects is the tree order of Parralax Layers and CanvasLayers
Steps to reproduce
There are two scenes
without_mirroring_A_over_B
andwith_mirroring_A_over_B
. They are named as such because their z-index values should order them such that A is drawn over B.You can reorder the tree-order of the two ParallaxLayers that contain
SpriteA
andSpriteB
. You will see that forwithout_mirroring...
it has no affect on draw order, but it does have an affect onwith_mirroring...
.Additionally, you can reorder
SpriteD
which shows the same thing, that ParallaxLayer does not consider z-index whatsoever whenmotion_mirroring
is used.Minimal reproduction project
ParallaxLayerOrdering.zip