Paralax layer doing weird

Godot Version

<Godot 4–>

Question




Can someone help?

可以,请问有什么事吗?

well the paralax layer is weird

你的场景是怎么放置的。
让我看看你的场景节点树。

okay
its in the pictures right

image

你的3个ParallaxLayer的motion_scale要不一样

motion_scale 的y要等于0

sorry, english?

我注意到你的视差图片是山和路,所以不应该在上下运动。
I noticed that your parallax image shows mountains and roads, so it shouldn’t be moving up or down.
要把ParallaxLayer节点的motion_scale和motion_offset的Vector2类型值的y属性设置为0.
To set the y attribute of the Vector2 type values for the motion_stale and motion_offset of ParallaxLayer nodes to 0
eg:

ParallaxLayer.motion_scale.y=0
ParallaxLayer.motion_offset.y=0

而地图是该你自己决定的,所以请自己设定x
And the map is up to you to decide, so please set x yourself
motion_offset能以不同的速度移动
Motion_offset can move at different speeds
这在 2D 游戏中可以创造一种深度错觉
This can create a sense of depth illusion in 2D games.

didnt work

请调整ParallaxLayer.motion_mirroring
Please adjust ParallaxLayer.motion_mirroring
reference material

Note: If you want the repetition to pixel-perfect match a Texture2D displayed by a child node, you should account for any scale applied to the texture when defining this interval. For example, if you use a child Sprite2D scaled to 0.5 to display a 600x600 texture, and want this sprite to be repeated continuously horizontally, you should set the mirroring to Vector2(300, 0).