मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग6.6k · #13793

camera-systems

यह क्या करती है

यह स्किल 2D और 3D गेम में कैमरे के व्यवहार को कवर करती है, सहज फ़ॉलो से लेकर दीवारों से टकराव के साथ थर्ड-पर्सन ऑर्बिट तक। यह उन गेम डेवलपर्स के लिए है जिनका कैमरा हिलता है, झटके से चलता है या लेवल के बाहर का इलाका दिखाता है।

कब इस्तेमाल करें

  • ✓जब 2D कैमरा खिलाड़ी का सहजता से पीछा करे और लेवल की सीमाओं के भीतर रहे।
  • ✓जब आप थर्ड-पर्सन ऑर्बिट कैमरा बना रहे हों जो दीवारों के आर-पार न जाए।
  • ✓जब आपका कैमरा हिलता, झटके खाता या मोशन सिकनेस देता है और उसे ट्यून करना है।

Skill का लिंक

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

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/disciplines/camera-systems/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरा 2D कैमरा हिलता है और लेवल के किनारे के बाहर का इलाका दिखाता है। क्या आप फ़ॉलो व्यवहार ठीक कर सकते हैं?”

हर हफ़्ते 5 नई skills, 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
अक्सर पूछे जाने वाले सवाल

क्या यह स्क्रीन शेक जोड़ती है?

यह शेक ऑफ़सेट का हुक देती है, लेकिन शेक की ताकत और समय गेम फ़ील स्किल से आते हैं।

क्या यह फ़र्स्ट-पर्सन कैमरा कवर करती है?

हाँ। इसमें थर्ड-पर्सन ऑर्बिट के साथ फ़र्स्ट-पर्सन लुक कंट्रोलर भी शामिल है।

क्या यह इंजन के कैमरा नोड कवर करती है?

इंजन में कैमरा सेटअप 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
अपडेट की गई
28/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

router

6.6k

यह आपके एजेंट को इंजन और काम के प्रकार को पहचानकर किसी अनुरोध के लिए सही गेम डेवलपमेंट स्किल चुनने में मदद करती है।

कोडिंगसामान्य कोडिंग

ai-behavior-trees-utility-ai

6.6k

यह आपके एजेंट को दुश्मनों और किरदारों के लिए बिहेवियर ट्री और यूटिलिटी AI सिस्टम बनाने में मदद करती है, जो प्राथमिकता और स्कोर से कार्रवाई चुनें।

कोडिंगसामान्य कोडिंग

audio-design

6.6k

आपके एजेंट को गेम ऑडियो मिक्सिंग सिखाती है: बस, डेसिबल में वॉल्यूम, डायलॉग में म्यूज़िक धीमा करना और साउंड इफ़ेक्ट की विविधता।

वीडियो और ऑडियोऑडियो और आवाज़

create-game-assets

6.6k

यह आपके एजेंट को गेम आर्ट का एकसमान सेट योजना बनाने और जाँचने में मदद करती है, स्टाइल गाइड और स्प्राइट सूची से लेकर साइज़ और नामकरण के नियमों तक।

डिज़ाइनइमेज और आइकन

मिलती-जुलती skills