Open 01010111 opened 4 months ago
traced this back to openFL's Stage.__mouseY
so I think it's probably safe to assume this isn't a flixel issue?
What is going on here? is this a way to resize the game?
width: 640px;
Here are my results:
getScreenPosition
and getPositionInCameraView
: (cam.viewMarginLeft, cam.viewMarginTop)
is at the top-left of the camera and (cam.viewMarginRight, cam.viewMarginBottom)
is the bottom-right of the cameragetWorldPosition
: self explanatory(0, 0)
is at the top-left of the FlxGame, (FlxG.width, FlxG.height)
is at the bottom-right of the FlxGameWhat I'm working on (or thinking about doing):
getGamePosition
: Same a _globalScreen
, I believe this is what you're aftergetWindowPosition
: (0, 0) is the top-left of the window, (stage.StageWidth, stage.StageHeight) is the bottom right of the windowgetViewPosition
, viewX
and viewY
: Replacement for the confusing "screen" fields and getPositionInCameraView
Code snippet reproducing the issue:
It's also useful to update
openfl-content
div's styling:Observed behavior:
When placing the cursor at the top-left most position on the screen,
trace(FlxG.mouse.getScreenPosition()
is returning(x: 0 | y: -4)
Expected behavior:
When placing the cursor at the top-left most position on the screen,
trace(FlxG.mouse.getScreenPosition()
should return(x: 0 | y: 0)