Camera2D will not render ParallaxLayer Transform Scaling

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

I feel stupid for encountering this problem, but it appears that setting a Camera2D as the current camera effectively ignores the Transform Scaling of ParallaxLayers in a ParallaxBackground, while Motion Scaling works fine. What do I need to do to enable Transform Scaling without scaling the layers’ children manually (or with gdscript)?

The Node hierarchy I am using generally looks like this (moving the camera in different positions in the hierarchy does not fix the issue):

O: SceneRoot
- <>: Camera2D
- []: ParallaxBackground
- - []: ParallaxLayer1
- - - O: Sprite
- - []: ParallaxLayer2
- - - O: Sprite

This simple issue is driving me crazy. Any help and explanations for this issue would be appreciated.

:bust_in_silhouette: Reply From: volzhs

According to this issue on github, Scaling ParallaxLayers via Script · Issue #3987 · godotengine/godot · GitHub

ParallaxLayer does not allow you to change position and scale AFTER it
was added to the scene.

Thanks for the response and pointing out the related issue!

Genji | 2016-08-25 17:01

:bust_in_silhouette: Reply From: Genji

After receiving some help, I was shown a simple work-around to accomplish the scaling I wanted.

Add a child Control node, or any node that can be scaled, to a ParallaxLayer you would like to have scaled children, and add the Sprites (or other visual elements) to that Control node:

O: SceneRoot
- <>: Camera2D
- []: ParallaxBackground
- - []: ParallaxLayer
- - - O: Control
- - - - O: Sprite1
- - - - O: Sprite2

The Control node, when scaled, will change the scaling of its children as normal.