A parallax scrolling layer to be used with ParallaxBackground.
    public class ParallaxLayer : Node2D

A ParallaxLayer must be the child of a ParallaxBackground node. Each ParallaxLayer can be set to move at different speeds relative to the camera movement or the ParallaxBackground.ScrollOffset value.

This node’s children will be affected by its scroll offset.

Note that any changes to this node’s position and scale made after it enters the scene will be ignored.

Inheritance Chain


    public ParallaxLayer()


    public Vector2 MotionMirroring { get; set; }

The ParallaxLayer’s Texture mirroring. Useful for creating an infinite scrolling background. If an axis is set to 0 the Texture will not be mirrored. Default value: (0, 0).

    public Vector2 MotionOffset { get; set; }

The ParallaxLayer’s offset relative to the parent ParallaxBackground’s ParallaxBackground.ScrollOffset.

    public Vector2 MotionScale { get; set; }

Multiplies the ParallaxLayer’s motion. If an axis is set to 0 it will not scroll.


    public Vector2 GetMirroring()

Getter for MotionMirroring

    public Vector2 GetMotionOffset()

Getter for MotionOffset

    public Vector2 GetMotionScale()

Getter for MotionScale

    public void SetMirroring(Vector2 mirror)

Setter for MotionMirroring

    public void SetMotionOffset(Vector2 offset)

Setter for MotionOffset

    public void SetMotionScale(Vector2 scale)

Setter for MotionScale