RedditPP Mascot

RedditPP

r/godot • … • u/DeadSuperHero

Godot 3D issue: Camera for FPS and TPS

I'm currently experimenting with a 3D game that implements both first and third person views. Originally, I tried switching between two cameras, one on a spring pivot, and another attached to a head bone. Unfortunately, this ended up being pretty janky: for FPS, it seems like I would effectively have to manipulate the head and neck bones for looking around. A newbie mistake I had made earlier involved rotating the bone attachment, which made movement feel as though I was drunk.

Reading through some documentation, I found a potentially simpler solution by setting the spring\_arm.spring\_length value to 0. It works for the most part, except the camera ends up stuck halfway into the player model's chest, rather than his face.

Here's what I'm trying to figure out: if I go down the modified spring\_length path, I'm going to need to adjust the camera position to the guy's head. If I instead do a dual-camera system, I'm going to have to do bone manipulation in FPS mode.

I guess my overall question is, what's the best solution here? I've been adapting a Godot Asset Template for [a third-person game](https://github.com/WaffleAWT/Godot-4.3-Third-Person-Controller) to have controller support, while also supporting keyboard and mouse. I've made some pretty good progress with the spring\_arm approach, but do I need to switch the camera's position to properly sit at head level? Or should I put in the extra work for two cameras?

I just want to polish this bit up before going back to developing gameplay.

— 0