본문으로 건너뛰기
Skillpedia
일반 코딩6.6k · #13793

camera-systems

하는 일

2D와 3D 게임의 카메라 동작을 다룹니다. 부드러운 추적부터 벽에 막히는 3인칭 궤도 카메라까지 포함합니다. 카메라가 떨리거나, 끊기거나, 레벨 밖을 보여 주는 문제를 겪는 게임 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓2D 카메라가 플레이어를 부드럽게 따라가면서 레벨 가장자리 안에 머물러야 할 때.
  • ✓벽을 통과하지 않는 3인칭 궤도 카메라를 만들고 있을 때.
  • ✓카메라가 떨리거나, 끊기거나, 멀미를 일으켜 조정이 필요할 때.

스킬 링크

https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/disciplines/camera-systems/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/disciplines/camera-systems/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 2D 카메라가 떨리고 레벨 가장자리 바깥을 보여 줍니다. 추적 동작을 고쳐 주시겠어요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 추적 로직에 데드존, 부드러운 이동, 선택적인 앞보기를 추가하고, 시야를 레벨 경계에 고정합니다. 3D에서는 충돌 시 카메라가 가까워지는 기능이 있는 궤도 입력과 흔들림 훅을 추가합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Camera systems

The camera is the player's window; bad camera work makes a good game feel awful. This skill covers the engine-neutral camera techniques — smooth follow, deadzones, look-ahead, bounds clamping, third-person orbit with collision, first-person look, and multi-target framing — and maps them onto each engine's camera node or rig.

When to use

  • Use when a 2D camera should follow the player smoothly, stay inside the level, lead the player's motion, or ignore small movements (deadzone).
  • Use when building a 3D third-person orbit camera (mouse/stick look, collision push-in) or a first-person look controller, or framing multiple targets at once.
  • Use to fix camera jitter, snapping, motion sickness, or a camera that shows past the level edge.

When not to use: for the magnitude and trigger of screen shake and impact juice, use game-feel (this skill exposes the shake offset hook it drives). For the engine's concrete camera node/component setup, use godot-3d-essentials (Camera3D, environment) or the engine skill. For player movement itself use the engine movement skill (godot-2d-movement). For performance of many cameras/render targets, see performance-optimization.

Core workflow

  1. Decide what the camera serves. Platformer (lead the jump, see hazards), top-down (center with deadzone), third-person (orbit + collision), first-person (look only). The genre sets the rules.
  2. Follow smoothly and frame-rate independently. Move the camera toward the target with exponential smoothing or a spring (SmoothDamp), not a fixed lerp(a, b, 0.1) — that 0.1 is per-frame and changes with frame rate.
  3. Add a deadzone so tiny target movements don't nudge the camera; it only follows once the target leaves a box/zone. Stops nausea in twitchy games.
  4. Lead the action with look-ahead by offsetting the camera target in the direction of motion or facing, eased in/out so it doesn't whip.
  5. Clamp to level bounds so the camera never shows outside the playable area; combine with smoothing so it eases to a stop at the edge.
  6. For 3D, separate look from collision. Orbit via yaw/pitch on a rig; use a spring arm / ray to pull the camera in when geometry blocks it; clamp pitch.
  7. Update the camera after the target moves. Follow in the late/post step (after movement and physics resolve) to avoid a one-frame lag jitter.
  8. Verify by moving the target at low and high frame rates, into corners and walls, and at the level edges; confirm no jitter, no peeking past bounds, smooth stops. Report what you saw.

Patterns

1. Godot 2D built-in follow: smoothing + bounds (don't hand-roll first)

# Godot 4.7 Camera2D. Engine-provided smoothing + hard limits + drag margins.
@onready var cam := $Camera2D
func _ready() -> void:
    cam.make_current()
    cam.position_smoothing_enabled = true
    cam.position_smoothing_speed = 6.0           # higher = snappier; lower = floatier
    cam.limit_left = 0; cam.limit_top = 0        # clamp to the level rect (pixels)
    cam.limit_right = level_width; cam.limit_bottom = level_height
    cam.drag_horizontal_enabled = true           # built-in deadzone via drag margins

2. Frame-rate-independent smooth follow (when you hand-roll it)

# RIGHT: exponential smoothing — same feel at any FPS. `rate` ~ 5..12.
func _follow(dt: float) -> void:
    var t := 1.0 - exp(-rate * dt)               # converges correctly regardless of dt
    global_position = global_position.lerp(target.global_position, t)
# WRONG: global_position = global_position.lerp(target.global_position, 0.1)
#        → faster smoothing at higher FPS; different feel on every machine.
# Unity 6.3 LTS: Vector3.SmoothDamp(transform.position, target.position, ref vel, smoothTime) in
# LateUpdate gives the same spring behavior with built-in frame-rate correction.

3. Deadzone + look-ahead (lead the player, ignore jitter)

# Camera only chases once the target leaves the deadzone box, then aims AHEAD of motion.
func _camera_target(dt: float) -> Vector2:
    var to := target.global_position - _focus
    var dz := deadzone_half_extents                  # e.g. Vector2(48, 32)
    # Only move the focus by the overflow beyond the deadzone (per axis).
    _focus.x += clampf(absf(to.x) - dz.x, 0, INF) * signf(to.x)
    _focus.y += clampf(absf(to.y) - dz.y, 0, INF) * signf(to.y)
    var lead := target.velocity.normalized
자주 묻는 질문

화면 흔들림도 추가하나요?

흔들림의 크기를 정하는 오프셋 훅은 제공하지만, 강도와 타이밍은 게임 감각 스킬에서 나옵니다.

1인칭 카메라도 다루나요?

네. 3인칭 궤도 카메라와 함께 1인칭 시점 조작 컨트롤러도 포함합니다.

엔진의 카메라 노드도 다루나요?

엔진 카메라 설정은 Godot나 Unity 카메라 스킬에 속하며, 이 스킬은 그쪽을 안내합니다.

상세 정보

작성자의 원본 설명

Build game cameras that feel good — 2D follow with a deadzone, look-ahead, smoothing, and level-bounds clamping; 3D third-person orbit with collision and first-person look; plus multi-target framing and a shake hook. Engine-neutral techniques that pair with the engine's camera node and rigs like Unity Cinemachine or Godot Camera2D/PhantomCamera. Use when the user mentions camera follow, follow camera, deadzone, look-ahead, camera smoothing, camera bounds/ limits, third-person camera, orbit camera, first-person look, Cinemachine, or camera jitter.

repo: gamedev-skills/awesome-gamedev-agent-skills

인기도

GitHub 스타
6.6k
순위
#13793
라이선스
Apache-2.0
업데이트
2026. 10. 28.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬