Let's deal with layers.
Each layer has a Scrolling Optionsparameter that sets the speed of movement of the layer relative to the camera.
For example, set the mugon the first layer of our level. In the layer settings, note that X coefficient and Y coefficient are equal to 0. This means that the layer will not move relative to the camera, that is, it will freeze in place.
If you run, we will see that the mug,literally, stuck to the camera.
Now, move the mug to the 3rd layer. The layer on which the elementsof the .
At startup, we see that the mug is missing.
See the settings of the 3rd layer. And we see that the coefficient of X and Yis equal to 1. This means that the layer will not be glued to the camera, but will move at a normal speed, relative to the camera.
But we need a mug to follow the camera. For this purpose, of course, it is possible to create a new layer, with the coefficients X, Y,equal to 0. But, there is a simplerway.
You need to remove the follow the framecheckbox, in the tinctures of the active object(Active).
We create the effect of paralax (Paralax).
Create 3 layers, each layer, set the desired values of the coefficients (values shown in the picture).
Then, place the mug in the same place, on these 3 layers.
Now, if you run, you will see a beautiful paralaxeffect.