Godot: Parallax Background

In this tutorial i will show you how to create Parallax Background using Godot game engine 3.1.1

Parallax Background

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.

Parallax Background

click on plus icon to show a panel named (create new node) that’s will help you to add a Parallax Background node.

Parallax Background

in the ‘search input’ write para, then select Parallax Background.

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

Parallax Background

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.

Parallax Background

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.

Parallax Background

After that turn off Centered to place the background in the right position. (Please see the picture above)

Parallax Background

Now let’s edit mirroring to fix that problem. (Please see the picture above)

Parallax Background

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.

Parallax Background

Duplicate Parallax Layer and change the sprite’s texture.

Parallax Background

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

Parallax Background

I think this tutorial is finished, so thank you for your time.