Token导航 LogoToken导航TokenDH.com
开发只读github未标认证来源可访问许可证需确认审计通过

godot-camera-systems戈多相机系统

Agent Skill

godot-camera-systems 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,840

周安装

122

GitHub Stars

138

下载量

996
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:godot-camera-systems(戈多相机系统)
来源仓库:https://github.com/thedivergentai/gd-agentic-skills
仓库路径:skills/godot-camera-systems
安装命令:
npx skills add https://github.com/thedivergentai/gd-agentic-skills --skill godot-camera-systems
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/thedivergentai/gd-agentic-skills --skill godot-camera-systems

简介

godot-camera-systems 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。

  • 适用于 GitHub 仓库管理和代码协作相关任务。
  • 围绕仓库状态、代码变更或协作事项进行整理。
  • 安装命令:npx skills add https://github.com/thedivergentai/gd-agentic-skills --skill godot-camera-systems。
  • 建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

SKILL.md

Camera Systems

Expert guidance for creating smooth, responsive cameras in 2D and 3D games.

NEVER Do

  • NEVER use global_position = target.global_position every frame — Instant position matching causes jittery movement. Use lerp() or position_smoothing_enabled = true [12].
  • NEVER use offset for permanent camera positioningoffset is for shake, sway, or temporary recoil effects only. Use position for permanent framing to avoid logic conflicts [14].
  • NEVER forget limit_smoothed = true for Camera2D — Hard boundaries cause jarring visual stops. Smoothing against limits ensures a professional feel [13].
  • NEVER enable multiple Camera2D nodes in the same viewport simultaneously — Only the last enabled camera takes precedence. Explicitly disable inactive cameras [15].
  • NEVER use SpringArm3D without a collision mask — It will clip through terrain and walls. Set it to the world/environment layer [16].
  • NEVER implement screen shake by randomizing position directly — This overwrites follow-logic. Use offset or a dedicated Trauma/Noise system to Layer shake over the follow-position [27, 28].
  • NEVER parent the Camera directly to a high-speed physics body — Physics stutter or parent rotation will cause motion sickness. Use RemoteTransform2D/3D with rotation sync disabled for a stable view [30].
  • NEVER use look_at() in 3D without a fallback for the 'Up' vector — If the target is directly above/below, the camera will flip wildly. Use guards or Quaternion math for vertical tracking.
  • NEVER rely on SubViewport defaults for Mini-maps — Viewports are expensive; explicitly set render_target_update_mode to UPDATE_WHEN_VISIBLE or a fixed lower framerate to save GPU [156].
  • NEVER use linear interpolation for Zoom — It feels 'robotic'. Use exponential lerp or a Tween with TRANS_CUBIC for a more natural tactical feel.

Available Scripts

MANDATORY: Read before implementing camera behaviors.

camera_shake_trauma_pro.gd

Advanced noise-based screenshake (Trauma system) for organic, non-jittery explosions and impacts.

cinematic_framing_logic.gd

Rule of Thirds and Lead Room management in code, ensuring high-quality cinematic composition.

camera_state_machine.gd

Managing transitions between 'Follow', 'Static', and 'Cinematic' camera states with Tweens.

minimap_viewport_manager.gd

SubViewport optimization for Mini-maps and UI overlays. Reduces render updates for better FPS.

split_screen_setup.gd

Dynamic split-screen architecture for local multiplayer, handling viewport stretching and audio listeners.

remote_transform_decoupling.gd

Decoupling camera position from player rotation/scale using RemoteTransform2D for high-speed stability.

zoom_damping_controller.gd

Non-linear, smooth zoom logic with tactical overview bounds and mouse-wheel support.

spring_lerp_camera_3d.gd

Physics-stable 3D follow camera using spring-mass interpolation to reduce follow-latency jitter.

first_person_sway.gd

Procedural 8-figure head bob and weapon sway logic for immersive First-Person systems.

deadzone_drag_margins.gd

Platformer-specific deadzone management using code to control follow-margins and drag-center behavior.


Camera2D Basics

extends Camera2D

@export var target: Node2D
@export var follow_speed := 5.0

func _process(delta: float) -> void:
    if target:
        global_position = global_position.lerp(
            target.global_position,
            follow_speed * delta
        )

Position Smoothing

extends Camera2D

func _ready() -> void:
    # Built-in smoothing
    position_smoothing_enabled = true
    position_smoothing_speed = 5.0

Camera Limits

extends Camera2D

func _ready() -> void:
    # Constrain camera to level bounds
    limit_left = 0
    limit_top = 0
    limit_right = 1920
    limit_bottom = 1080

    # Smooth against limits
    limit_smoothed = true

Camera Shake

extends Camera2D

var shake_amount := 0.0
var shake_decay := 5.0

func _process(delta: float) -> void:
    if shake_amount > 0:
        shake_amount = max(shake_amount - shake_decay * delta, 0)
        offset = Vector2(
            randf_range(-shake_amount, shake_amount),
            randf_range(-shake_amount, shake_amount)
        )
    else:
        offset = Vector2.ZERO

func shake(intensity: float) -> void:
    shake_amount = intensity

# Usage:
$Camera2D.shake(10.0)  # Screen shake on explosion

Zoom Controls

extends Camera2D

@export var zoom_speed := 0.1
@export var min_zoom := 0.5
@export var max_zoom := 2.0

func _unhandled_input(event: InputEvent) -> void:
    if event is InputEventMouseButton:
        if event.button_index == MOUSE_BUTTON_WHEEL_UP:
            zoom_in()
        elif event.button_index == MOUSE_BUTTON_WHEEL_DOWN:
            zoom_out()

func zoom_in() -> void:
    zoom = zoom.move_toward(
        Vector2.ONE * max_zoom,
        zoom_speed
    )

func zoom_out() -> void:
    zoom = zoom.move_toward(
        Vector2.ONE * min_zoom,
        zoom_speed
    )

Look-Ahead Camera

extends Camera2D

@export var look_ahead_distance := 50.0
@export var target: CharacterBody2D

func _process(delta: float) -> void:
    if target:
        var look_ahead := target.velocity.normalized() * look_ahead_distance
        global_position = target.global_position + look_ahead

Split-Screen (Multiple Cameras)

# Player 1 Camera
@onready var cam1: Camera2D = $Player1/Camera2D

# Player 2 Camera
@onready var cam2: Camera2D = $Player2/Camera2D

func _ready() -> void:
    # Split viewport
    cam1.anchor_mode = Camera2D.ANCHOR_MODE_DRAG_CENTER
    cam2.anchor_mode = Camera2D.ANCHOR_MODE_DRAG_CENTER

Camera3D Patterns

Third-Person Camera

extends Camera3D

@export var target: Node3D
@export var distance := 5.0
@export var height := 2.0
@export var rotation_speed := 3.0

var rotation_angle := 0.0

func _process(delta: float) -> void:
    if not target:
        return

    # Rotate around target
    rotation_angle += Input.get_axis("camera_left", "camera_right") * rotation_speed * delta

    # Calculate position
    var offset := Vector3(
        sin(rotation_angle) * distance,
        height,
        cos(rotation_angle) * distance
    )

    global_position = target.global_position + offset
    look_at(target.global_position, Vector3.UP)

First-Person Camera

extends Camera3D

@export var mouse_sensitivity := 0.002
@export var max_pitch := deg_to_rad(80)

var pitch := 0.0

func _ready() -> void:
    Input.mouse_mode = Input.MOUSE_MODE_CAPTURED

func _input(event: InputEvent) -> void:
    if event is InputEventMouseMotion:
        # Yaw (horizontal)
        get_parent().rotate_y(-event.relative.x * mouse_sensitivity)

        # Pitch (vertical)
        pitch -= event.relative.y * mouse_sensitivity
        pitch = clamp(pitch, -max_pitch, max_pitch)
        rotation.x = pitch

Camera Transitions

# Smooth camera position change
func move_to_position(target_pos: Vector2, duration: float = 1.0) -> void:
    var tween := create_tween()
    tween.tween_property(self, "global_position", target_pos, duration)
    tween.set_ease(Tween.EASE_IN_OUT)
    tween.set_trans(Tween.TRANS_CUBIC)

Cinematic Cameras

# Camera path following
extends Path2D

@onready var path_follow: PathFollow2D = $PathFollow2D
@onready var camera: Camera2D = $PathFollow2D/Camera2D

func play_cutscene(duration: float) -> void:
    var tween := create_tween()
    tween.tween_property(path_follow, "progress_ratio", 1.0, duration)
    await tween.finished

Best Practices

1. One Active Camera

# Only one Camera2D should be enabled at a time
# Others should have enabled = false

2. Parent Camera to Player

# Scene structure:
# Player (CharacterBody2D)
#   └─ Camera2D

3. Use Anchors for UI

# Camera doesn't affect UI positioned with anchors
# UI stays in screen space

4. Deadzone for Platformers

extends Camera2D

func _ready() -> void:
    drag_horizontal_enabled = true
    drag_vertical_enabled = true
    drag_left_margin = 0.3
    drag_right_margin = 0.3

Reference

Related

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.09%
按下载量换算349

Claude

29.06%
按下载量换算289

Cursor

17.77%
按下载量换算177

Gemini CLI

8.51%
按下载量换算85

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills