I just want to align a seamless parallax layer with a sprite to the bottom of my 2D window and only move it down when I jump, but when I change the y value of motion_scale from 1 to 0.5 (for example) the vertical offset of the layer node has moved up when I run the game.
I have tried a lot of things to fix it, but it doesn't align perfectly. I know I need to use $Layer1.motion_scale.y
in my calculations, but I can't find the right formula.
This is the closest I got, "0.1" is what needs to be fixed:
$FrontLayer/Sprite.position.y = -$FrontLayer/Sprite.region_rect.size.y * ($FrontLayer.motion_scale.y - 0.1)