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.91k stars 62 forks source link

Camera 2D should (optionally) rotate with the follow target #341

Open nanodeath opened 6 days ago

nanodeath commented 6 days ago

Project Type

2D

Feature Description

When a PhantomCamera2D is in Follow Mode Glued or Simple, the camera should, in some cases, also match the global rotation of the follow target.

Use Cases

One example would be a top-down racing game. Assuming the world is static and the car is the object moving around (and the camera is following the car), I may want the car to remain fixed in the middle of the viewport pointing up. The current behavior is that "up" (-Y) is always at the top of the screen.

(Optional) Proposed Solution

From a user perspective, I'd like to see a checkbox in the main section for enabling rotation matching. Conceivably there could also be some kind of damping specifically for rotation, but it could be nauseating so I'd personally turn that feature off.

This may be related to #214.

nanodeath commented 6 days ago

Also...I'm not sure what ramifications a rotated follow target would be for Limits. Maybe the only option would be to set a Limit Target.

ramokz commented 5 days ago

Think this is a good idea.

Should be fairly easy to add in.