Phantom Camera Documentation

repository·main·Indexed 23 days ago

https://github.com/ramokz/phantom-camera

A Godot 4 plugin (compatible with Godot 4.4+) that provides advanced camera behaviors for Camera2D and Camera3D nodes, inspired by Unity's Cinemachine. It features priority-based camera switching, dynamic transitions via Tweens, and various follow and look-at modes including Glued, Simple, Group, Path, Framed, and Third Person. Includes a Viewfinder for editor previews and support for reframing multiple nodes.

Tokens
910
Snippets
0
Records
11
Agent score
36%

What's inside Phantom Camera

  1. Overview of Phantom Camera

    main

    Phantom Camera is a Godot 4 plugin (compatible with Godot 4.4+) designed to simplify and extend the behaviors of built-in Camera2D and Camera3D nodes. Inspired by Unity's Cinemachine, it provides advanced camera logic such as:

    • Following and Looking: Easily follow or look at specific nodes with optional smooth/dampened movement.
    • Reframing: Automatically adjust the camera to keep multiple nodes within the view.
    • Dynamic Transitions: Animate between different PhantomCamera nodes on demand.
  2. Manage camera switching with Priority

    main
    Use the Priority feature to determine which PhantomCamera should be active with the Camera2D or Camera3D. When a new PhantomCamera receives a higher priority than the currently active one, the Camera2D/Camera3D will seamlessly transition to the new camera.
  3. Configure Follow Modes for 2D and 3D cameras

    main

    Follow Modes define how the Camera2D or Camera3D follows or repositions based on its target(s). Available modes include:

    • Glued: Sticks directly to its target.
    • Simple: Follows the target with an optional offset and damping.
    • Group: Follows the centre of a collection of targets.
    • Path: Follows a target while being positionally confined to a Path node.
    • Framed: Enables dynamic framing of a target using dead zones. The camera remains still until the target moves outside the horizontal or vertical dead zone sizes (configured in the inspector).
    • Third Person (3D only): Designed for third-person experiences. It applies a SpringArm3D node as a parent, allowing adjustment of Collision Mask, Spring Length, and Margin via the PhantomCamera node.
  4. Install Phantom Camera via Godot Asset Library

    main

    The most stable and recommended method for installing Phantom Camera is through the built-in Godot Asset Library:

    1. Open the AssetLib tab in Godot.
    2. Search for "Phantom Camera".
    3. Download and install the plugin. Important: Ensure you only select the phantom_camera directory during installation.
    4. Enable the plugin by navigating to Project/Project Settings/Plugins.
  5. Install Phantom Camera via GitHub Main (Unstable)

    main

    To use the latest, potentially unstable features from the main branch:

    1. Download the latest main branch zip file.
    2. Extract the zip file.
    3. Move the addons/phantom_camera directory into your project's root directory.
    4. Enable the plugin in Godot via Project/Project Settings/Plugins.
  6. Use the Viewfinder to preview camera views

    main

    The Viewfinder allows you to preview what the Camera2D or Camera3D sees when attached to a PhantomCamera.

    Requirements for rendering:

    • A Camera must be present.
    • A PhantomCameraHost must be present.
    • A PhantomCamera must be present.

    Access the viewfinder via the bottom panel labelled Phantom Camera in the editor.

  7. Configure Look At modes for Camera3D

    main

    Look At modes define where the Camera3D should be looking by adjusting its rotational value. Available modes include:

    • Mimic: Copies the rotational value of its target.
    • Simple: Looks at the target with an optional offset.
    • Group: Looks at the centre of a collection of targets.