0 votes

Hello, I'm fairly new to Godot Engine. Or creating games. Or programming actually

I'm trying to make an RPG Undertale-like game and starting with only two simple "levels" but I don't know how to set a background. I've created one with photoshop but how to import it in my project so it just fills the screen without moving while my character evolves in it ?

This question may have been asked but I browsed a lot of QA and didn't find it/or I didn't know the terms for it (again, totally newbie AND not native english speaker)

Thank for your time

asked Jan 14, 2019 in Engine by Jacottin (19 points)
edited Jan 14, 2019 by Jacottin

1 Answer

0 votes
Best answer

Try with ParallaxBackground ad a child of the root node on your scene. You can set an image to it and it will always be fixed relative to screen. If you want diferent backgrounds move at different speed to create a depth feeling, use a ParallaxLayer for each image all as child of ParallaxBackground, and set different motion_scale om each one. The scale motion_scale sets how fast that background moves relative to camera movement. If you set 0.1 in x scale, when camera moves 10px, background will move 1. This video from heartbeast should help.

answered Jan 14, 2019 by p7f (2,666 points)
selected Jan 14, 2019 by Jacottin

Thanks a lot, it works perfectly !

Glad to help! Would you then select my answer so others find quickly the answer?

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.