Sprite x y coordinates use the centre, not upper left of sprite

Hi,
When I set the x, y coordinates of the sprites on the canvas they locate as if the x, y was the centre of the sprite, not the upper left corner. All my sprite are offset up and to the left from the intended locations. To test this I created a 50 x 50 px dot at 0, 0 on the 300 x 225 px canvas. See screenshot. Which is the correct definition of x & y sprite properties?
Thx!
Screen Shot 2022-09-03 at 3.27.21 PM

1 Like

As far as I remember, this has always been the case.

Maybe I’ve been reading the description wrong. I think Swift uses the centre of the imagesprite, while AI2 uses the top / left corner for 0, 0. I interpreted the Thunkable documentation like the latter. Screenshot from Thunkable Docs:

1 Like

See this old post talking about the same issue. I know what is written in the docs is not the same but this post will reconfirm my point.

1 Like

Thanks, I’ll convert my sprite location coordinates to the midpoint.

1 Like

Is this a platform specific issue? Do you see the same behavior on iOS that you do on android? I feel like I’ve used it on iOS in this wasn’t the case but it’s been quite some time

1 Like

I use Android but at that time when we discussed this issue I am certain that both @tatiang and @catsarisky were using iPhones.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.