@@ -16,17 +16,22 @@ up though, so this page provides in-depth descriptions of some properties and ho
1616 recommended to use over the :ref: `ParallaxLayer<class_parallaxlayer> ` and
1717 :ref: `ParallaxBackground<class_parallaxbackground> ` nodes.
1818
19- Scroll scale
20- ------------
19+ Getting started
20+ ---------------
21+
22+ The parallax node supports adding textures as child nodes, so you can use one or many textures to make up each layer.
23+ To begin, place each image or images you want to have scroll independently as a child of their own parallax node.
24+ Make sure that the top left of your images are at the ``(0,0) `` crossing, like the image below. See the section on
25+ :ref: `positioning<positioning> ` for why this is important.
26+
27+ .. image :: img/2d_parallax_size_viewport.webp
2128
2229The backbone of the parallax effect is the :ref: `scroll_scale <class_parallax2d_property_scroll_scale >` property.
2330It works as a scroll-speed multiplier, allowing layers to move at a different speed than the camera for each axis set.
2431A value of 1 makes the parallax node scroll at the same speed as the camera. If you want your image to look further away
2532when scrolling, use a value lower than 1, with 0 bringing it to a complete stop. If you want something to appear closer
2633to the camera, use a value higher than 1, making it scroll faster.
2734
28- .. image :: img/2d_parallax_size_viewport.webp
29-
3035The scene above is comprised of five layers. Some good :ref: `scroll_scale <class_parallax2d_property_scroll_scale >`
3136values might be:
3237
@@ -43,6 +48,7 @@ The video below displays how these values affect scrolling while in-game:
4348 :autoplay:
4449 :loop:
4550 :muted:
51+ :align: center
4652
4753Infinite repeat
4854---------------
@@ -119,6 +125,8 @@ Below, you can see that repeating the image twice makes it large enough to cover
119125
120126.. image :: img/2d_parallax_size_repeat.webp
121127
128+ .. _positioning :
129+
122130Poor positioning
123131~~~~~~~~~~~~~~~~
124132
0 commit comments