Hello,
I'm trying to make a 2 player, split screen platformer to play with my daugther.
I used Give me a Pixel's tutorial to achieve the split screen effect.
Everything seems to work fine, except the background layers with different parallax setting.
I have 6 background layers with different x and y parallax rates.
I have a canvas object on screen, that covers the right half of the viewport.
On each frame the I move the objects to canvas position:
System Set varDX to Player2.X - Player1.X
System Set varDY to Player2.Y - Player1.Y
BgBushes Set position to (Self.X - varDX + (ViewportWidth("Canvas") / 2), Self.Y - varDY)
DrawingCanvas Paste object BgBushes with effects
And after I paste the object on to canvas, I move the objects back to their positions.
BgBushes Set position to (Self.X + varDX - (ViewportWidth("Canvas") / 2), Self.Y + varDY)
As a result, It pastes the background layers to canvas but ignores the parallax values.
I can't figure out how to calculate the parallax values to move the objects into correct position before pasting them on canvas.
I've uploaded the project file to dropbox.
I would appreciate if anyone could help me figure out how to fix this problem.
Thanks in advance.