Skip to content

πŸ‘»πŸŽ₯ Control the movement and dynamically tween 2D & 3D cameras positions. Built for Godot 4. Inspired by Cinemachine.

License

Notifications You must be signed in to change notification settings

paddy-exe/phantom-camera

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

What is it?

Phantom Camera is a Godot 4 plugin designed to provide and simplify common behaviors for the built-in Camera2D and Camera3D nodes - heavily inspired by a Unity package called Cinemachine.

It allows for simple behaviours such as following and looking at specific nodes, with an optional smooth/dampened movement, to more advance logic such as reframing itself to keep multiple nodes in view and dynamically animate between specific camera positions, i.e. other PhantomCamera nodes, on demand.

Wiki Page Roadmap

Features

Determines which PhantomCamera should be active with the Camera2D/Camera3D.

When a new camera recieves a higher priority than currently active PhantomCamera the Camera2D/Camera3D will seamlessly transition to the new one.


Define how the Camera2D/Camera3D should follow, or reposition based on, its target(s).

Sticks to its target.


Follows the target with an optional offset and damping.


PhantomCamera2D

PhantomCamera3D
2D_Follow_Simple.mp4
3D_Follow_Simple.mp4

Follows the centre of a collection of targets.


PhantomCamera2D

PhantomCamera3D
2D_Follow_Group.mp4
3D_Follow_Group.mp4

Follows a target while being positionally confined to a Path node.


PhantomCamera2D

PhantomCamera3D
2D-Follow-Path.mp4
3D-Follow-Path.mp4

Define the Zoom level for the Camera2D.


PhantomCamera2D

PhantomCamera3D
2D_Zoom.mp4
Not available in 3D

Defines where the Camera3D should be lookingβ€”adjusting its rotational value.


Mimic

Copies the rotational value of its target.



Simple

Looks At the target with an optional offset.


PhantomCamera2D

PhantomCamera3D
Not available in 2D
3D-Look-At-Simple.mp4


Group

Looks at the centre of a collection of targets.


PhantomCamera2D

PhantomCamera3D
Not available in 2D
3D-Look-At-Group.mp4

Tweak how the Camera2d/Camera3D tweens to a newly active PhantomCamera.


PhantomCamera2D

PhantomCamera3D
2D_Tween.mp4
3D_Tween.mp4

πŸ“” Deep Dive & How to use

See the Phantom Camera - Wiki.

πŸͺ€ Example Scenes

A 2D and 3D example scenes can be found inside res://addons/phantom_camera/examples titled 2DExampleScene and 3DExampleScene respectively.

πŸ’Ύ Installation

  1. Download the repo and copy addons/phantom_camera to your root Godot directory under res://.
  2. Enable the plugin inside Project/Project Setttings/Plugins
  3. And that's it! For more help, see Godot's official documentation

πŸ“– Roadmap

See the project page for upcoming features.

FAQ

What is the intent behind the plugin?

Cameras are an essential part of practically any game for rendering what you see on the screen. But rarely do they remain static and immovable, but instead dynamic and changes based on what happens in the game.

The plugin is meant to simplify some common camera behaviour, such as smoothly moving between different points in space at specified points in time or retain a particular positional/rotational value relative to other elements.

The end goal is to make it functional enough to become a generalised camera extension for Godot projects.

What is the state of the plugin?

Ongoing, but still in early stages. Core features have been implemented, but may change as more get added. Things will likely break or change along the way. It's also worth keeping in mind that lots of key and, likely, frequently used features are yet to be done.

See the project page to see planned features.

Does this work for Godot 3.5 or older?

Unfortunately not.

GDScript has received a lot of changes and improvements in 4.0, but as a result it would require a rather large rewrite to make it compatible with older versions.

When will X feature be added?

There's no deadline or precise timeframe for when things get implemented. The milestones page should give a good idea for what has, will, and currently being looked at.

Contribution

Issues, PRs, suggestions and feedback are welcome. Please create an Issue for bugs or a Discussion post for suggestions or general discussions.

Credits

MIT License

About

πŸ‘»πŸŽ₯ Control the movement and dynamically tween 2D & 3D cameras positions. Built for Godot 4. Inspired by Cinemachine.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • GDScript 100.0%