R3F & Rapier third person controller and follow camera

Hello,

I just wanted to ask if anyone has created a third person controller and follow camera using @react-three/fiber & @react-three/rapier similar to this example → CodeSandbox - CodeSandbox

1 Like

the one in your link looks good, why not using it?

otherwise there’s a primitive keyboardcontrols in drei GitHub - pmndrs/drei: 🥉 useful helpers for react-three-fiber this is also being used in bruno simons last chapter where you make a physics game with a controller. Three.js Journey — Create a game with R3F

1 Like

The version in the link i posted doesnt use @react-three/rapier or any other physics library

ideally id like to have the character wrapped with a so it can interact with other objects in the space

also, im not great at maths, but from what i can understand the movement/force applied is needs to differ from the above example

1 Like

here’s an example with a first person controller using rapier

Thanks, I’ve seen this example, but it doesn’t quite match the ‘3rd person’ example im looking for

Main differences are the camera location and rotation behind the player model

I am looking exactly for the same as you @kdigidydawg , by any chance did you find a solution?
I found a few (where the camera will also rotate according to keystroke / direction user is going, with a subtle lerp and delay) but they are all in vanilla three js and i’m struggling to port it to r3f / drei.

you can check this article it’s about third person control
https://medium.com/@m.mhde96/react-three-fiber-third-person-control-a0476c189dd1

Here is a 3rd person controller demo. Sorry, it doesn’t use rapier. It uses useCannon
image
Third Person Controller Demo: Obstacle Course - React Three Fiber Tutorials

Hopefully my project helps :grin:: ecctrl (with animations) - CodeSandbox
You can also find it in pmndrs/ecctrl: GitHub - pmndrs/ecctrl: 🕹️ A floating rigibody character controller

1 Like

Amazing, I’ve been looking for something like this, thanks!