You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sprites already have the concept of "local" and "world" coordinates, embodied in their localBounds and worldBounds properties.
But sometimes (as in #10), it's handy to convert between these coordinate systems. It might be nice to have localToWorld and worldToLocal methods that do this, taking into account scaling, rotation, and position in the same way that worldBounds does.
This would make it easier to figure out the sprite image pixel under a screen point, though that still will require a bit of math since images are centered on local 0,0.
The text was updated successfully, but these errors were encountered:
Sprites already have the concept of "local" and "world" coordinates, embodied in their
localBounds
andworldBounds
properties.But sometimes (as in #10), it's handy to convert between these coordinate systems. It might be nice to have
localToWorld
andworldToLocal
methods that do this, taking into account scaling, rotation, and position in the same way thatworldBounds
does.This would make it easier to figure out the sprite image pixel under a screen point, though that still will require a bit of math since images are centered on local 0,0.
The text was updated successfully, but these errors were encountered: