I'm writing a mini 2d game, the scene background is based on two images with parallax effect.
I want the right edge of both images, finish at the same time matching the right edge of the canvas. But I've got, both images finish on the canvas left edge.
parallaxQuotient = nearImage.width / farImage.width;
And scrolling like this:
speed = 1; farImage.position.x -= speed / parallaxQuotient ; nearImage.position.x -= speed ;
How to get both images ending on canvas right edge?