Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
ParallaxBackground¶
Inherits: CanvasLayer < Node < Object
A node used to create a parallax scrolling background.
Description¶
A ParallaxBackground uses one or more ParallaxLayer child nodes to create a parallax effect. Each ParallaxLayer can move at a different speed using ParallaxLayer.motion_offset. This creates an illusion of depth in a 2D game. If not used with a Camera2D, you must manually calculate the scroll_offset.
Note: Each ParallaxBackground is drawn on one specific Viewport and cannot be shared between multiple Viewports, see CanvasLayer.custom_viewport. When using multiple Viewports, for example in a split-screen game, you need create an individual ParallaxBackground for each Viewport you want it to be drawn on.
Properties¶
layer |
|
|
|
||
|
||
|
||
|
||
|
||
|
Property Descriptions¶
Vector2 scroll_base_offset = Vector2(0, 0)
The base position offset for all ParallaxLayer children.
Vector2 scroll_base_scale = Vector2(1, 1)