Feature Idea: Mouse Input Grab in Window
kevin.rushforth at oracle.com
Thu Dec 17 19:41:48 UTC 2020
Immersive 3D games is not really a key use case for JavaFX, so I doubt
we would add any API to support this. I don't see it as a feature we
could implement in isolation anyway. As an example, we don't support
full-screen exclusive mode (FSEM) on Windows, which might be needed to
implement this completely. You might be able to do something in the
application: set your stage to fullScreen, and update the cursor
manually each frame (possibly using Robot::mouseMove). You would have to
figure out how to interpret the mouse events you will receive.
On 12/17/2020 9:39 AM, Mark Raynsford wrote:
> On 2020-12-17T17:17:24 +0000
> Almas Baimagambetov <almaslvl at gmail.com> wrote:
>> *Use case:* 3D games or 3D modelling tools, where the application "grabs"
>> (gets exclusive control of) the mouse and moving the mouse doesn't move the
> This is pretty much essential for mouse-based camera control in 3D
> simulations, especially when combined with a "warp cursor to center of
> window" feature. Typically, the cursor will be confined to the window
> and warped to the center of the window at the start of every frame.
> This allows for all mouse movements to be treated as delta offsets from
> the center of the window, and these can typically be passed directly
> into camera handling functions.
More information about the openjfx-dev