HaxeFlixel / flixel

Free, cross-platform 2D game engine powered by Haxe and OpenFL
https://haxeflixel.com/
MIT License
1.93k stars 427 forks source link

account for scale, origin, offset, angle and pixelPerfectPosition in getGraphicMidpoint #3125

Closed Geokureli closed 3 weeks ago

Geokureli commented 2 months ago

Adds getGraphicBounds as well, which getGraphicMidpoint uses. Accounts everything except scrollFactor

Note: I've ignored scrollFactor because we are getting the graphic's position in world space, not screen space, the "idea" is that the object physically exists in the world at its x and y regardless of scrollFactor, which only changes where we "perceive" it to be