How can I implement third person camera? #801
Replies: 1 comment 1 reply
-
You can create a third person camera by putting your camera and an object in the same group, and pointing the camera at the object. Then when you move the group around it'll give the effect of the camera following the object. Eg
By updating the position of ref.current your camera and player will move together. Check out the camera rig recipe for how to actually make r3f use the camera - https://github.com/pmndrs/react-three-fiber/blob/master/markdown/recipes.md#using-your-own-camera-rig As for controls, Three.js has a first person controls example - https://threejs.org/docs/#examples/en/controls/FirstPersonControls - it's a bit more complicated than I'd expect but it's doing quite a lot. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any example of a 3rd person chasing an object camera? Also with controller something like WASD
Beta Was this translation helpful? Give feedback.
All reactions