+1 vote

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

in Engine by (20 points)
edited by

1 Answer

+6 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.

by (3,505 points)
selected by

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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.