Skip to content

Camera does not rotate when CharacterBody3D rotates #640

Description

@ShylockGao

Camera does not rotate when CharacterBody3D rotates

Hi, I'm using PhantomCamera3D in Godot 4 and ran into a rotation issue.

Node Structure

CharacterBody3D
 └─ Node3D
     └─ PhantomCamera3D

Problem

When I rotate the CharacterBody3D, the camera does not rotate with the character.

Example code:

character.rotate(Vector3.UP, relative.x * 0.01)

The character rotates correctly, but the PhantomCamera3D keeps its original orientation.

Expected Behavior

I expected the camera to rotate together with the character since it is a child node in the scene tree.

Questions

  1. Is there a setting required in PhantomCamera3D to follow the parent rotation?
  2. Should the camera be configured in a different node hierarchy?
  3. Is there a recommended setup for a third-person camera using PhantomCamera?

If anyone has a recommended node structure or settings for this scenario, I would really appreciate it.

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions