physics-tuning
यह क्या करती है
यह स्किल उन आम सेटिंग्स की व्याख्या करती है जिनसे गेम फ़िज़िक्स स्थिर और प्रतिक्रियाशील लगती है। यह उन डेवलपर्स के लिए है जिनकी चीज़ें हिलती हैं, दीवारों के आर-पार निकल जाती हैं या हवा में तैरती लगती हैं।
कब इस्तेमाल करें
- ✓जब कोई चीज़ स्थिर रहनी चाहिए तब भी हिले या काँपे।
- ✓जब तेज़ चीज़ें दीवारों के आर-पार निकल जाएँ, जिसे टनलिंग कहते हैं।
- ✓जब गुरुत्वाकर्षण, द्रव्यमान, ड्रैग या टक्कर परतें सेट करनी हों ताकि गति सही लगे।
Skill का लिंक
https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/disciplines/physics-tuning/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी तेज़ गोलियाँ पतली दीवारों के आर-पार निकल जाती हैं और मेरे एक पर एक रखे बक्से हिलते हैं। क्या आप फ़िज़िक्स सेटिंग्स ट्यून कर सकते हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट फ़िज़िक्स का काम फ़िक्स्ड टाइमस्टेप पर ले जाता है, चरणों के बीच बनी स्थितियों के बीच इंटरपोलेशन करता है, और तेज़ चीज़ों के लिए कंटीन्यूअस टक्कर जाँच चालू करता है। जिटर रोकने के लिए वह द्रव्यमान, ड्रैग और टक्कर परतें भी समायोजित करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Physics tuning
Most "bad physics" is not a bug in the engine — it's a mismatch between the
fixed-timestep simulation and the variable-rate render loop, or untuned
mass/drag/CCD/layer settings. This skill covers the engine-neutral knobs that
make physics stable and responsive; pair it with godot-physics or
unity-physics for the concrete APIs.
When to use
- Use when motion jitters, objects pass through walls (tunneling), stacks explode, or movement feels floaty/sticky/laggy.
- Use to decide what goes in the fixed (physics) step vs the render frame, and how to interpolate between them.
- Use to tune gravity, mass, drag, restitution, solver iterations, sleeping, and collision layers/masks.
When not to use: for an engine's exact physics nodes/components and
collision callbacks, use godot-physics or unity-physics. For movement
decisions (when to jump, AI steering) use input-systems and game-ai. For
platformer jump-feel specifics like coyote time/jump buffering, that's input/
controller territory — see input-systems and the platformer genre.
Core workflow
- Run physics on a fixed timestep. Simulate at a constant rate (e.g. 50–60
Hz). A fixed
dtmakes the simulation deterministic-ish and stable; a variabledtmakes integration and collisions inconsistent. - Put physics work in the physics callback, not the render frame. Apply
forces/velocities and read collisions in the fixed step (
FixedUpdate/_physics_process), using that step'sdt. - Interpolate rendering between physics ticks. The render frame rate ≠ the physics rate, so smoothly interpolate transforms toward the latest physics state, or enable the engine's Rigidbody interpolation, to remove visible stutter.
- Tune the body, not the scene. Set mass for relative weight, drag for damping, gravity scale per object, and restitution/friction via materials.
- Stop tunneling with CCD on small/fast bodies; cap maximum velocity.
- Stabilize stacks/joints with more solver iterations, sane mass ratios, and sleeping for resting bodies.
- Verify by feel and stress test. Play at low and high frame rates; throw fast objects at thin walls; stack and shove bodies. Report what you observed.
Patterns
1. Fixed timestep for simulation, render interpolation for smoothness
# Physics callback: runs at the FIXED rate. Use its dt for all integration.
func _physics_process(dt): # Unity: void FixedUpdate()
velocity += gravity * dt # integrate with the FIXED dt
move_and_slide() # engine resolves collisions this step
_prev_pos = _curr_pos; _curr_pos = global_position # record for interpolation
# Render frame: runs as fast as the display. Interpolate between physics states.
func _process(_frame_dt): # Unity: void Update()
var alpha = Engine.get_physics_interpolation_fraction() # 0..1 within the tick
visual.global_position = _prev_pos.lerp(_curr_pos, alpha)
# RIGHT: integrate in the fixed step, render via interpolation.
# WRONG: applying forces in _process/Update with frame dt — speed and collisions
# then depend on frame rate and jitter under load.
Most engines offer this for you: Godot's project setting
physics/common/physics_interpolation (off by default; it interpolates every
node, 2D and 3D) and Unity's Rigidbody.interpolation = Interpolate. Prefer the
built-in before hand-rolling, and never do both on the same node.
2. Stop tunneling: CCD + a speed cap
# Fast, small bodies skip past thin colliders between ticks. Two fixes:
body.continuous_cd = true # RigidBody3D bool (RigidBody2D: CCD_MODE_* enum)
# Unity: rb.collisionDetectionMode = CollisionDetectionMode.ContinuousSpeculative (cheap, covers
# dynamic bodies too) or ContinuousDynamic (fast vs fast); plain Continuous sweeps vs static only.
# Cap velocity so a single step can't move more than ~one collider thickness.
const MAX_SPEED := 40.0
if velocity.length() > MAX_SPEED:
velocity = velocity.normalized() * MAX_SPEED
# Rule of thumb: max_distance_per_step (= speed / physics_hz) should be < the
# thinnest wall. Raise physics_hz or enable CCD when that fails.
3. Body tuning: mass, drag, gravity scale, material
# Mass is RELATIVE weight in collisions; it does NOT change fall speed (gravity
# accelerates all masses equally). Use drag and gravity
अक्सर पूछे जाने वाले सवाल
फ़िक्स्ड टाइमस्टेप क्यों?
स्किल कहती है कि स्थिर फ़िज़िक्स स्टेप सिमुलेशन को स्थिर रखता है, जबकि बदलता स्टेप टक्करों को असंगत बना देता है।
कंटीन्यूअस टक्कर जाँच क्या है?
यह एक तरीका है जो तेज़ चीज़ों को पतली दीवारों के आर-पार जाने से रोकता है।
क्या यह छलाँग के अहसास को कवर करती है?
कोयोटे टाइम जैसी छलाँग की सहायता इनपुट और कंट्रोलर के विषय हैं, जो इनपुट स्किल में आते हैं।
जानकारी
लेखक का मूल विवरण
Tune game physics for stable, good-feeling motion — fixed vs variable timestep, render interpolation, mass/gravity/drag, continuous collision detection (CCD) to stop tunneling, fixing jitter, and collision layers/masks. Engine-neutral. Use when the user mentions physics feel, jitter, tunneling, fixed timestep, FixedUpdate, CCD, bouncing/unstable physics, or collision layers.
लोकप्रियता
- GitHub स्टार
- 6.6k
- रैंकिंग में स्थान
- #13802
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 28/10/2026
कमेंट
- …
इस repository की और skills
router
6.6kयह आपके एजेंट को इंजन और काम के प्रकार को पहचानकर किसी अनुरोध के लिए सही गेम डेवलपमेंट स्किल चुनने में मदद करती है।
ai-behavior-trees-utility-ai
6.6kयह आपके एजेंट को दुश्मनों और किरदारों के लिए बिहेवियर ट्री और यूटिलिटी AI सिस्टम बनाने में मदद करती है, जो प्राथमिकता और स्कोर से कार्रवाई चुनें।
audio-design
6.6kआपके एजेंट को गेम ऑडियो मिक्सिंग सिखाती है: बस, डेसिबल में वॉल्यूम, डायलॉग में म्यूज़िक धीमा करना और साउंड इफ़ेक्ट की विविधता।
camera-systems
6.6kयह आपके एजेंट को ऐसे गेम कैमरा बनाने में मदद करती है जो सहजता से पीछा करें, लेवल के भीतर रहें, और 3D में घूम या देख सकें।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।