Parallax not moving (on its own)
Asked Answered
C

2

0

Hi everyone ! I've been having some trouble working on a space shooter. I'd love to have a parallax background moving on its own on the x axis but I can't seem to make it move on its own !
After looking it up, it seems the very simplest option is the very best, and I've typed a ParallaxBackground script. Here it is :

extends ParallaxBackground

@export var scrolling_speed = 10

func _process(delta):
scroll_base_offset.x -= scrolling_speed

Unfortunately, nothing moves. A few youtube tutorials seem to have it working really well ? I've also tried with the scroll_offset but
I might just have missed a little box to check or something. Thank you so much for the read and for your help !

pink

Creosote answered 17/9, 2023 at 18:4 Comment(0)
R
0

Creosote Perhaps scroll_base_offset is only effective when the background is moving automatically with the camera. Setting motion_offset on a ParallaxLayer instead should work for sure for manual scrolling.

Reeder answered 16/11, 2023 at 12:16 Comment(0)
C
0

I'll try that thanks !

Creosote answered 29/12, 2023 at 22:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.