Izzimach / react-three-legacy

React bindings to create and control a 3D scene using three.js
Other
1.52k stars 128 forks source link

Examples of using PointerLockControls / Keyboard controls #84

Open LubergAlexander opened 8 years ago

LubergAlexander commented 8 years ago

I noticed that "orbitControls" is a property of a Scene, and it works fine. Is there any way to use PointerLockControls ? I tried using this module: https://www.npmjs.com/package/three-pointerlock

and although I can probably pass it as "orbitControls" since the function's signature is the same, I can't call "controls.update(1)" in the render loop, since I do not have easy access to the instance of PointerLockControls which is created by react-three and stored in its internals.

Can you please point me in the right direction ? Maybe there is another module which is compatible with it ?