I just forgot how to do parallax. I searched the forms but no useful help. And I cant fine my form in which I got the help. please how to do parallax when using limits with camera.
I have camera with limits
Place the parallax cameras in function of the main camera position instead the player position, this way, when the main camera stops in a limit, the backgrounds will also be stopped even if the player still moves
When I have problems I make small experimentation projects, to work on them!!! So just take a look at this small project. Every thing is there you just have to ad one or two events to make it work.
Parallax with camera limitations.zip (80.7 KB)
Ok, here you go:
parallax_with_limits.zip (75.6 KB)
Switch the events 3.1 and 3.2 (deactivate one and activate the other), there are two methods:
-The first method moves the camera of the BackGround layer, it follows the main camera with a “speed” factor (0.75 = 75% of the main camera speed), note that you need a large background if the scene is big and/or the speed factor is high.
-The second method modifies the texture offset for the background object, again, with the same speed factor. This way the background doesn’t move but the texture, so you only need a background with the size of the texture to achieve an infinite scroll
Thanks!
Is there any way I can do this in GD5?
Please don’t necropost. Make a new topic and link this one if you want, but probably none of the members that used to have this discussion are still around here and the active users won’t look at such old messages.
To answer your question, to make a parallax you need to set the x position of the backgroung to speed * player position. Often the speed is less than 1 (0.5, 0.75 etc).