LayerToCanvas Expression

Discussion and feedback on Construct 2

Post » Fri Dec 04, 2015 9:30 am

What is the usage of Y coordinate in LayerToCanvasX(layer,X,Y) expression? It seems that the Y coordinate has no effect on the return value of the expression. Same goes to LayerToCanvasY,CanvasToLayerX,CanvasToLayerY.
B
16
S
4
G
1
Posts: 202
Reputation: 1,556

Post » Fri Dec 04, 2015 1:11 pm

It is necessary for calculating the correct answer when the layer or layout is rotated, since there is no longer a linear correlation between the axes. If you don't rotate anything though, I think you can ignore it, but you may as well provide it the right value in case you change your mind later.
Scirra Founder
B
378
S
220
G
84
Posts: 23,868
Reputation: 188,151

Post » Fri Dec 04, 2015 6:13 pm

Ahh I see, thanks for the reply!
B
16
S
4
G
1
Posts: 202
Reputation: 1,556


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 4 guests