ramokz / phantom-camera

👻🎥 Control the movement and dynamically tween 2D & 3D cameras. Built for Godot 4. Inspired by Cinemachine.
https://phantom-camera.dev/
MIT License
1.97k stars 65 forks source link

Retrofit onto existing character controller #187

Closed swapmasterx closed 6 months ago

swapmasterx commented 6 months ago

Project Type

3D

Feature Description

I'm trying to add this to my project but I'm having issues integrating it onto my character controller. Currently the mouse rotational control is dictated by a 3d "head" node that the current normal camera is a child off. Moving the camera to root and even changing the character script to reference the camera directly instead of the head leads to the issue of mouse control no longer working. As such I can't meet the min requirement of having the camera being directly childed to the root of the project.

Use Cases

Enabling use of Phantom Camera without breaking existing system. I'm new to coding and still learning how to think in code so I'm just looking for some help to adjust my current system.

Importance

Low - there are workarounds where the proposed feature would just simplify things

Usage

Only me - this is highly specific to just my project

(Optional) Proposed Solution

No response

ramokz commented 6 months ago

There shouldn't be anything preventing you from using it as a drop-in addition to your existing setup.

If I'm reading it right, you should be able to place a PCam3D node where your Camera3D currently is, then move the Camera3D node to be a child of the scene's root node.

For example:

The Camera3D would then just mimic the position and rotation of the PCam3D node.

If are able to share a small sample project with your set-up then I'm also happy to have a look.

swapmasterx commented 6 months ago

You are correct. Didn't realize it worked like that my bad.