Create movable camera first person

There’s a number of good measures in web browsers to prevent malicious actions by websites - e.g. playing audio, locking the pointer, entering fullscreen all require user interaction first

Just wondering how is it possible to check if the user is on the first click? What is the best method to accomplish this task?

by user 204651044183998464

You could subscribe to the window pointerdown event in start() and run your code there. See Element: pointerdown event - Web APIs | MDN

start() {
 window.addEventListener("pointerdown", evt => ...);

}

Thank you for your help! It works like a charm!
However, once the cursor is hide, the buttons in my scene cannot be clicked. Is there any way to solve this issue? :thinkies:

by user 204651044183998464