ParallaxBackground

Inherits: CanvasLayer < Node < Object A node used to create a parallax scrolling background.

Description

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.

Properties

Property Descriptions

  • Vector2 scroll_base_offset ParallaxLayer children.

  • Vector2 scroll_base_scale ParallaxLayer children.

  • bool scroll_ignore_camera_zoom true, elements in ParallaxLayer child aren’t affected by the zoom level of the camera.

  • Vector2 scroll_limit_begin scroll_limit_end to work.

  • Vector2 scroll_limit_end scroll_limit_begin to work.

  • Vector2 scroll_offset Camera2D, but can be used to manually manage scrolling when no camera is present.