ParallaxLayer

Inherits: Node2D < CanvasItem < Node < Object

A parallax scrolling layer to be used with ParallaxBackground.

Description

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.scroll_offset value.

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

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

Properties

Vector2motion_mirroringVector2( 0, 0 )
Vector2motion_offsetVector2( 0, 0 )
Vector2motion_scaleVector2( 1, 1 )

Property Descriptions

DefaultVector2( 0, 0 )
Setterset_mirroring(value)
Getterget_mirroring()

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.


DefaultVector2( 0, 0 )
Setterset_motion_offset(value)
Getterget_motion_offset()

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


DefaultVector2( 1, 1 )
Setterset_motion_scale(value)
Getterget_motion_scale()

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

Doc ID missing

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 1970-01-01 at 00:00:00. It’s the English Stable version because it’s what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.