ParallaxLayer
Obsoleto: Use the Parallax2D node instead.
Hereda: Node2D < CanvasItem < Node < Object
Una capa de scrolling de paralaje para ser usada con ParallaxBackground.
Descripción
Una Capa de paralaje debe ser el hijo de un nodo ParallaxBackground. Cada ParallaxLayer puede ser configurado para moverse a diferentes velocidades relativas al movimiento de la cámara o al valor ParallaxBackground.scroll_offset.
Los hijos de este nodo se verán afectados por su desplazamiento.
Nota: Cualquier cambio en la posición y escala de este nodo realizado después de que entre en la escena será ignorado.
Propiedades
|
||
|
||
|
||
physics_interpolation_mode |
|
Descripciones de Propiedades
Vector2 motion_mirroring = Vector2(0, 0) 🔗
The interval, in pixels, at which the ParallaxLayer is drawn repeatedly. Useful for creating an infinitely scrolling background. If an axis is set to 0, the ParallaxLayer will be drawn only once along that direction.
Note: If you want the repetition to pixel-perfect match a Texture2D displayed by a child node, you should account for any scale applied to the texture when defining this interval. For example, if you use a child Sprite2D scaled to 0.5 to display a 600x600 texture, and want this sprite to be repeated continuously horizontally, you should set the mirroring to Vector2(300, 0).
Note: If the length of the viewport axis is bigger than twice the repeated axis size, it will not repeat infinitely, as the parallax layer only draws 2 instances of the layer at any given time. The visibility window is calculated from the parent ParallaxBackground's position, not the layer's own position. So, if you use mirroring, do not change the ParallaxLayer position relative to its parent. Instead, if you need to adjust the background's position, set the CanvasLayer.offset property in the parent ParallaxBackground.
Note: Despite the name, the layer will not be mirrored, it will only be repeated.
Vector2 motion_offset = Vector2(0, 0) 🔗
El desplazamiento de la ParallaxLayer en relación con el ParallaxBackground del padre ParallaxBackground.scroll_offset.
Vector2 motion_scale = Vector2(1, 1) 🔗
Multiplica el movimiento de la ParallaxLayer. Si un eje se establece en 0, no se hará scroll.