D
Drago Supremo
Guest
Hi everyone,
i tried to add a simple parallax scrolling effect to my platform by this code found on a tutorial.
Object: obj_parallax
Create Event:
Step Event:
Now the problem i suppose is that in the tutorial the camera moved in a simple way in the Step Event above so that the camera moved before the parallax effect and the last one was perfectly synchronized, while i'm using all the functions in the Views section in my room settings so that the parallax effect sets before the camera movement (because if i'm not wrong the camera movement take place after all step events),
getting an initial delay effect when the camera starts to move or stop because in the first and last frames the Step in parallax is still using the previous frame's view_xview value.
I tried to fix this changing the Step Event into a Draw Event, but this doesn't look like a an efficient solution considering also that the obj_parallax should set invisble and that anyway this didn't work.
I hope i explained myself sufficiently well and thank's in advance for the help.
i tried to add a simple parallax scrolling effect to my platform by this code found on a tutorial.
Object: obj_parallax
Create Event:
Code:
///Sets the Parallax Factor
parallax[0] = 0;
for (i = 0; background_visible[i]; i++)
{
parallax[0] = background_x[i] / 100;
}
Code:
///Makes The Parallax Effect
for (i = 0; background_visible[i]; i++)
{
background_x = parallax [i] * view_xview;
}
getting an initial delay effect when the camera starts to move or stop because in the first and last frames the Step in parallax is still using the previous frame's view_xview value.
I tried to fix this changing the Step Event into a Draw Event, but this doesn't look like a an efficient solution considering also that the obj_parallax should set invisble and that anyway this didn't work.
I hope i explained myself sufficiently well and thank's in advance for the help.