0 votes

Any idea on how to make a BG follow the player on from side to side, not up and down?

I wan't it to automatically follow the player (not from when I move left to write with controls). Only Left to Write, NOT Up & Down

Some help and ideas would be nice, thanks.

in Engine by (23 points)

you mean the background will only move when your player move ?

do this for the BG: set_pos(Vector2(yourplayernode.getX(), yourplayernode.getY()))

@Phil88n you are setting both X and Y, that won't work as intented. That will actually stick the background behind the player and not make it scroll at all.

1 Answer

0 votes

The platformer demo does this, its background only moves horizontally and not vertically.
If you are using ParallaxBackground, try to set Base Scale Y to zero?

by (28,880 points)
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.