ParallaxBackground

    A node used to create a parallax scrolling background.

    A ParallaxBackground uses one or more child nodes to create a parallax effect. Each ParallaxLayer can move at a different speed using . This creates an illusion of depth in a 2D game. If not used with a Camera2D, you must manually calculate the .

    DefaultVector2( 0, 0 )
    Setterset_scroll_base_offset(value)
    Getterget_scroll_base_offset()

    • scroll_base_scale

    The base motion scale for all ParallaxLayer children.


    Defaultfalse
    Setterset_ignore_camera_zoom(value)
    Getteris_ignore_camera_zoom()

    If true, elements in child aren’t affected by the zoom level of the camera.



    • scroll_limit_end
    Default
    Setterset_limit_end(value)
    Getterget_limit_end()

    Bottom-right limits for scrolling to end. If the camera is outside of this limit, the background will stop scrolling. Must be higher than scroll_limit_begin to work.


    The ParallaxBackground’s scroll value. Calculated automatically when using a , but can be used to manually manage scrolling when no camera is present.