-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tile object Y coordinate not saved properly #386
Comments
It's not an oversight, but a feature. And I fully admit that it is a confusing feature. The registration point (or origin) of tile objects is their bottom-left corner. Once that is clear, it is obvious why a tile object at 0,0 will disappear off the top of the canvas. Now that it is established that an origin at bottom-left for tile objects is in many cases confusing, there is the plan to make this configurable. I thought there would be an issue open for this already, but I can't find it now. |
Thanks bjorn, I just wanted to make sure before I coded a permanent work around into our engine. Aimee |
It's interesting to note that when parsing objects, I only have to offset objects by their height (the origin in HaxeFlixel is top left), for objects that have a guid (an image). All other objects seem to be drawn in the right place. |
@crazysam Yes, this issue is about tile objects only. And actually, you don't offset the objects by their height, but by the height of the tile image (tile objects do not have a size, currently). |
I'm guessing it's just an oversight, but if you create a new 32x32 tile object, set it's coordinates as 0,0 it'll disappear off the top (y) of the canvas by 32 pixels.
I'm sure it's something super simple like changing (rows * tileHeight) to ((rows-1) * tileHeight) or something :)
Aimee
The text was updated successfully, but these errors were encountered: