Godot Version
4.2.2
Question
Hi all,
I have a question regarding “Parallax Scrolling” and how to do it. I am doing a course from Udemy and in this course we have set up a scene that everything works great, the images of the clouds move across the viewport well, the images repeat in a nice manner - I was very impressed, and way incredibly easy. Until …
The thing is the scene controlling the parallax is parented to the camera, so the background images are always in the scene, and the camera has a lot of code to control tweening. So, that when the character moves to the right the clouds actually go backwards sometimes faster than the character and when the hero goes to the left the clouds actually speed up
, definitely not the effect I want.
I tried unparenting it from the camera and just to be sure what would happen and everything moves normally, however, the clouds are no longer in the viewport and chop and change, when the repeats are supposed to happen and move too far right and nothing is on-screen. Then tried putting in UI elements but there are always in front, yes, yes, I know, but, I had to try something!
So, what is the best way to handle parallax in Godot, is there any easy way like parenting it to a camera node and having the bg images being unaffected by any movement code. Or, am I doomed to a complete redesign .
As always any help is greatly appreciated!
Regards.