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
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 camera
getWorldPosition: self explanatory
_globalScreenX/Y: (0, 0) is at the top-left of the FlxGame, (FlxG.width, FlxG.height) is at the bottom-right of the FlxGame
What I'm working on (or thinking about doing):
getGamePosition: Same a _globalScreen, I believe this is what you're after
getWindowPosition: (0, 0) is the top-left of the window, (stage.StageWidth, stage.StageHeight) is the bottom right of the window
getViewPosition, 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)
The text was updated successfully, but these errors were encountered: