How do i make 3D camera?

How do i make WithThreeJS camera to do something like this?

i already tried to do something similar but i am too inexperienced to do that and it’s only kinda (not) working

camera kinda follows player hitbox, however after a while it will slowly add distance to itself and fly off to the space

also camera isn’t object because for some reason when i make it one it just doesn’t work at all

I’d take a look at the FPS example project, look at the events and behaviors to see how it is set up.