ParallaxLayer

Inherits: Node2D < CanvasItem < Node < Object

Category: Core

Brief Description

A parallax scrolling layer to be used with ParallaxBackground.

Member Functions

Vector2 get_mirroring ( ) const
Vector2 get_motion_offset ( ) const
Vector2 get_motion_scale ( ) const
void set_mirroring ( Vector2 mirror )
void set_motion_offset ( Vector2 offset )
void set_motion_scale ( Vector2 scale )

Member Variables

Description

A ParallaxLayer must be the child of a ParallaxBackground node. All child nodes will be affected by the parallax scrolling of this layer.

Member Function Description

Return the mirroring of the ParallaxLayer.

  • Vector2 get_motion_offset ( ) const
  • Vector2 get_motion_scale ( ) const

Return the motion scale of the ParallaxLayer.

  • void set_mirroring ( Vector2 mirror )

Set the mirroring of the ParallaxLayer. If an axis is set to 0 then that axis will have no mirroring.

  • void set_motion_offset ( Vector2 offset )
  • void set_motion_scale ( Vector2 scale )

Set the motion scale of the ParallaxLayer. If an axis is set to 0 then it will not move at all, it will stick with the camera.