In this tutorial i will show you how to create Parallax Background using Godot game engine 3.1.1
Before you start this tutorial you must have a camera that can follow a moving Player.
OK lets start.
Part 1: Creation of Nodes
the first thing you do is to select the scene where you want create Parallax Background, In this tutorial i will create it in StageOne scene.
click on plus icon to show a panel named (create new node) that’s will help you to add a Parallax Background node.
in the ‘search input’ write para, then select Parallax Background.
Right click on Parallax Background node and select add child node Or press ‘Control + A‘.
But this time you will add Parallax Layer node
Right click on Parallax Layer node and select add child node Or press ‘Control + A‘.
in the search input write sprite, then select a sprite node.
if looks like the picture above that main everything is OK.
Part 2: Edit Nodes
In FileSystem dock select the image you want to use as a background, and drag it to sprite Texture in inspector dock on the right.
After that turn off Centered to place the background in the right position. (Please see the picture above)
Now let’s edit mirroring to fix that problem.
left-Click on Parallax Layer node and go to the inspector to edit Mirroring.
In this tutorial, The width of images that i use is 1024px, because of that I give mirroring 1024.
Duplicate Parallax Layer and change the sprite’s texture.
I use 4 pictures in the background, that why I have four Parallax Layer.
left-Click on Parallax Layer node and go to the inspector to edit Scale. (Please see the picture above)
Parallax Layer4: Scale = 0.95 – Parallax Layer3: Scale = 0.85 – Parallax Layer2: Scale = 0.75 – Parallax Layer2: Scale = 0.75
I think this tutorial is finished, so thank you for your time.