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?
Develop games in your browser. Powerful, performant & highly capable.
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))
Very nice. Thank you.