Migrate Pointer Look controls #522
AlbertoRocaM
started this conversation in
General
Replies: 1 comment 1 reply
-
@AlbertoRocaM I've been working on something that uses the pointerlock controls as well, this is generally how I did it: import { PointerLockControls } from 'three/examples/jsm/controls/PointerLockControls'
import { extend, useFrame, useThree } from 'react-three-fiber
extend({ PointerLockControls })
........
const {
camera,
gl: {domElement}
} = useThree()
const controls = useRef()
return(
<pointerLockControls ref={controls} args={[camera, domElement]}/>
) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, im trying to use PointerLook controls to look arround with mouse and walk on the scene like in the example:
https://threejs.org/examples/?q=pointer#misc_controls_pointerlock
I just started with fiber and three. Cant find any example or help to do that.
If someone can help i will apreciate a lot any kind of example or tip.
Thx
Beta Was this translation helpful? Give feedback.
All reactions