Hello,
I have a vertical scroller game. My player's Y position remains static in the center of the screen while the background and the background elements scroll vertically up and down giving an impression that the player is moving.
Game Layout : 1920 * 3240 (i.e. 3 backgrounds of 1920 * 1080 which scrolls in a loop)
The background elements are pinned to the backgrounds making them move along.
I am trying to find the Y position of the background element relative to the ViewportTop on every tick as the position keeps changing on up and down arrows key press. But I could not wrap my head around it. Can someone please share how can this be achieved?