I'm trying to find out the best approach when showing a player their body from a first-person view (like in Cyberpunk). So far, I've parented the camera to a Node3D used for pivoting the player's head.

Camera Pivot

This pivot lets me move the camera outside the model's head and rotate the pivot/head from my controller script. This is how I got my player laid out:

  • CharacterBody3D
    • CollisionShape3D (Capsule)
      • Mixamo Skeleton3D
    • Heads (Node3D)
      • Camera(Camera3D)

Here's the problem: If I look down low enough, the player's chest and head gets in the way of the camera:

head in the way

Granted Mixamo Ybot characters have large chests. Both walk and run animations naturally pitch the head low enough during the animation to get in the way of the camera:

The gray sphere is the camera position

I'm trying to figure what's the best way of handling this. Here are some ideas I thought of:

  • Is there a way to cull out part of the character body? Maybe gradually fade away the area of the body closer to the camera.
  • Or somehow parent the camera to the head's animation movement while giving the head node an offset. Also find a way to stabilize the movement of the camera

Thanks!

    Parent this "Heads (Node3D)" to the head bone. Don't have the camera as the child of this node, but have a separate camera controller script on the camera copying the position of that node.