Parallax
Makes a background layer scroll slower than the world as the camera moves, for depth: far hills at 0.2, near trees at 0.7. Everything the entity and its children draw shifts with it. With RepeatX or RepeatY, its sprite repeats to fill the view, so a short strip of sky or hills never runs out.
Applied when the game is drawn, so it never changes the entity’s transform: colliders, buttons and the Scene view all use where the transform puts it. The layer is drawn exactly there when the camera is at the world’s origin.
Works with: Sprite (to repeat a strip of background)
In a network game, each machine keeps its own entity with this on it: it isn’t sent.
Properties
Section titled “Properties”Each is listed as its key in the scene file and the MCP tools, then its kind of value, its default and what it does.
factor: [x, y] = [0.5,0.5]. How much the layer moves with the world on X and Y: 1 like everything else, 0 stuck to the camera (a distant sky), and in between for layers further back. (Field: a vector.)repeatX: true or false = false. Repeats the entity’s sprite side by side to fill the view’s width. (Field: on or off.)repeatY: true or false = false. Repeats the entity’s sprite top to bottom to fill the view’s height. (Field: on or off.)
Scripts use it as Parallax: its methods, events and values that aren’t saved with the scene.