Getting PointerLockControls needed parameters

First of all I’m new here, so maybe I’m doing stuff the hard way… I’m trying to make a first person controller, and to get rid of the cursor and be able to move the mouse free from restrictions of screen borders it seems I need to implement PointerLockControls, but it requires me to get a THREE.perspectiveCamera and a domElement as parameters for it, I’m still figuring out stuff and don’t know how to get those references from the scene, can you guys point me in the right direction?

Original Post on Discord

by user 262331051802755072

You can get both from this.context from inside your component (this.context.mainCamera and this.context.domElement)

Have a look at Needle Engine Scripting | Needle Engine Documentation :slightly_smiling_face:

missed it… sorry, again, trying to figure stuff out still, Thanks a lot!

by user 262331051802755072

No problem!