-
I want to lock the cursor position on the game screen (in the center or just don't let the cursor go outside the window) |
Beta Was this translation helpful? Give feedback.
Answered by
bogdan-ov
May 7, 2023
Replies: 2 comments
-
I recommend checking out https://api.haxeflixel.com/flixel/input/mouse/FlxMouse.html
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Well... I found the solution by myself // Put it somewhere in `update` function
public function update(elapsed:Float) {
FlxG.stage.application.window.warpMouse(0, 0);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
bogdan-ov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Well... I found the solution by myself