If I have an object on a layer with 0% parallax, how do I get its X and Y coordinates relative to a layer with 100% parallax?
To convert from layer A to B:
X = CanvasToLayerX("B", LayerToCanvasX("A", x, y), LayerToCanvasY("A", x, y))
Y = CanvasToLayerY("B", LayerToCanvasX("A", x, y), LayerToCanvasY("A", x, y))
Develop games in your browser. Powerful, performant & highly capable.
Very nice. Thank you.