Skills

Camera System

Use when implementing cameras, smooth follow, screen shake, camera zones, and...

Install

npx skills add jame581/GodotPrompter --skill camera-system -g -a claude-code -y
Category
Media
Updated
3d ago
License
MIT
Context cost
Mediumabout 2,799 tokens
Runs scripts
No, instructions only

What it does

Use when implementing cameras, smooth follow, screen shake, camera zones, and transitions for 2D and 3D

Camera Systems in Godot 4.3+

All examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, then C#.

Related skills: player-controller for first-person camera setup, state-machine for camera state transitions, godot-optimization for camera culling and performance, physics-system for physics interpolation and camera smoothing, 2d-essentials for canvas layers, parallax scrolling, and coordinate conversion, math-essentials for smoothstep and lerp-based interpolation, tween-animation for camera shake and cinematic transitions, phantom-camera for a Cinemachine-style camera addon.


1. Camera2D Basics

Key Properties

PropertyTypeDescription
position_smoothing_enabledboolEnables built-in position smoothing (lerp toward target)
position_smoothing_speedfloatSpeed of built-in smoothing (default 5.0)
drag_horizontal_enabledboolEnables a horizontal drag zone; camera only moves when target exits zone
drag_vertical_enabledboolEnables a vertical drag zone
limit_leftintLeft pixel boundary, camera will not scroll past this
limit_rightintRight pixel boundary
limit_topintTop pixel boundary
limit_bottomintBottom pixel boundary
zoomVector2Zoom level; Vector2(2, 2) = 2× zoom in, Vector2(0.5, 0.5) = zoom out

Set limits to match your tilemap or level bounds so the camera never shows outside the world. Limits are in world pixels, not tiles.


2. Smooth Follow

A manual follow camera gives more control than the built-in smoothing, you can add look-ahead, offset, and custom easing.

GDScript

extends Camera2D

## Target node to follow (assign in Inspector or via code)
@export var target: Node2D

## How quickly the camera catches up to the target (higher = snappier)
@export var follow_speed: float = 8.0
Read the whole SKILL.md on GitHub

More in Media