NUI Allow Pointer Lock

im trying to test something using a pointer lock

My Test:
im trying to implement a html5 games first person shooter to NUI and pointerlock is needed for the mouse to operate normal.

ROOT DOCUMENT: NUI CFX → MyScript Body Document: Request Pointerlock to Div or Different Document Like Iframe seems to be ignored.

it is working with just running the HTML files using my google crome,
pointer locks to be work as normal.

but when running using NUI (custom script),
this is the error that cromnium print at console (F8).
the root document of this element is not valid for pointer lock

so i perhaps pointerlock is blocked by default or maybe it is not possible due to the NUIFOCUS?

Pointer lock makes no sense if the mouse cursor is already ‘locked’ by the game window and input isn’t even handled by the browser’s usual window management (as that makes no sense in an in-game browser).

1 Like