Index of every page on this site: llms.txt
All skills
jame581 avatar

/phantom-camera

@426e8ab
by Jan Mesarčjame581/godotprompter979 stars
63
Run it yourself

Use when using the Phantom Camera addon — PhantomCamera2D/3D with priority-based switching, follow and look-at modes, and tween transitions

Use this Skill: https://skilld.dev/gh/jame581/godotprompter/phantom-camera

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesfollow-modes.md

≈890 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Follow modes

Reference for skills/phantom-camera/SKILL.md — the FollowMode enum, per-mode properties, GDScript and C# setup, group auto-reframe, and follow options (axis lock on both nodes; rotate-with-target and look-ahead are 2D only).

← Back to SKILL.md


FollowMode enum (2D and 3D share the first six; 3D adds THIRD_PERSON):

enum FollowMode {
    NONE = 0, GLUED = 1, SIMPLE = 2, GROUP = 3, PATH = 4, FRAMED = 5,
    THIRD_PERSON = 6,  # PhantomCamera3D only
}
Mode Behavior Key properties
GLUED Sticks exactly to follow_target. follow_target
SIMPLE Follows follow_target with an offset and optional damping. follow_offset, follow_damping, follow_damping_value
GROUP Follows the centroid of follow_targets, can auto-reframe. follow_targets: Array[Node2D/3D]
PATH Follows follow_target while confined to the closest point on follow_path. follow_path (Path2D/Path3D)
FRAMED Dead-zone follow — only moves once the target nears the frame edge. dead_zone_width, dead_zone_height; emits dead_zone_reached(side)
THIRD_PERSON (3D) Drives a SpringArm3D at the target, allowing orbit. spring_length, collision_mask, shape, margin, vertical_rotation_offset, horizontal_rotation_offset
# Player-follow with damping — PhantomCamera2D inspector or code
extends PhantomCamera2D

func _ready() -> void:
    follow_mode = FollowMode.SIMPLE
    follow_target = get_node("../Player")
    follow_damping = true
    follow_damping_value = Vector2(0.15, 0.15)  # lower = snappier
# Boss-fight group shot that auto-zooms to keep both combatants framed
extends PhantomCamera2D

func _ready() -> void:
    follow_mode = FollowMode.GROUP
    follow_targets = [get_node("../Player"), get_node("../Boss")]
    auto_zoom = true
    auto_zoom_min = 1.0
    auto_zoom_max = 2.5
using PhantomCamera;

public partial class PlayerFollowSetup : Node
{
    [Export] private Node2D _pCamNode; // has a PhantomCamera2D node/script attached
    [Export] private Node2D _player;

    public override void _Ready()
    {
        // FollowMode has no wrapper setter (getter-only) — set it on the underlying node.
        _pCamNode.Set("follow_mode", (int)FollowMode2D.Simple);

        var pCam = _pCamNode.AsPhantomCamera2D();
        pCam.FollowTarget = _player;
        pCam.FollowDamping = true;
        pCam.FollowDampingValue = new Vector2(0.15f, 0.15f); // lower = snappier
    }
}

GROUP follows the same pattern: _pCamNode.Set("follow_mode", (int)FollowMode2D.Group), then pCam.FollowTargets, pCam.AutoZoom, pCam.AutoZoomMin/AutoZoomMax — identical PascalCase names.

GROUP auto-reframe uses auto_zoom/auto_zoom_min/auto_zoom_max/auto_zoom_margin in 2D (adjusts Camera2D.zoom), and auto_follow_distance/auto_follow_distance_min/auto_follow_distance_max in 3D (adjusts distance along local -z).

Follow options: follow_axis_lock (FollowLockAxis — 2D: NONE, X, Y, XY; 3D adds Z, XZ, YZ, XYZ), rotate_with_target: bool (2D-only; requires Camera2D.ignore_rotation = false), lookahead: bool + lookahead_time/lookahead_acceleration/lookahead_deceleration and a lookahead_max/lookahead_max_value velocity clamp (velocity-based look-ahead; 2D-only — PhantomCamera3D has no lookahead).

Query state with is_following() -> bool; snap instantly (bypassing damping) with teleport_position().

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning7d3 checks · Risk SAFE
  • Gen Agent Trust Hub7d

    The skill provides comprehensive instructions and code examples for using the Phantom Camera addon in the Godot Engine. It covers installation, setup, camera modes, and transition effects for both GDScript and C#. No security risks were detected.

  • Socket7d

    No alerts

  • Snyk7d

    Risk: MEDIUM · 1 issue

Signed by skilld at 426e8ab. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 6 days ago.

Activeupdated last week

README badge

README badge for jame581/godotprompter/phantom-camera