Hi!
I am trying to have my game create a tiled background on a Layer with a parallax of 90, 90. I am having trouble placing it at the right position, as I want it to be aligned with objects on layers with normal parallax, but its always way too much to the left/right/up/down etc.
(320, 288 is the window size, since the array position given is in the top-left corner I added those in as a way of centering it. Doesn't work.)
I've tried using the LayerToCanvasX and then CanvasToLayer X solution I've seen people use, but I am still having issues. I believe it might have something to do with the position it is currently scrolled to at the time of spawning the object? I'm a bit out of my depth here and I;m not really sure what to do next?
For context my game randomly generates the map at the beginning of the run, and I want to place a background in a transparent spot (on the layer with 90,90 parallax) behind the normal background (on the layer with normal parallax). That way the background on the bottom scrolls differently than the background on the layer above, giving the area a bit of depth. I just can't figure out how to calculate the proper position taking parallax into account!
Can someone help me with this? Thanks in advance, I'm pretty stumped.