exitPointerLock without pressing escape?

I’m looking for a solution to give me camera controls when the user is left clicking down with a pointer lock. Then on mouse release give access to the cursor without having to press escape so the user can clock on game objects in the scene.

Is this possible?

Hi @i73
you can control pointerLock using

engine.enterPointerlock()
engine.exitPointerlock()

enterPointerlock of course requires a user interaction,
but exitPointerlock can be called at any time.

1 Like

I thought as much but when I try to implement it I don’t see it in auto complete:

Is this just me being dumb? And thank you!

I think there’s just some minor issues with the intellisense sometimes :slight_smile:

1 Like