physics-tuning
Qué hace
Explica los ajustes habituales que hacen que la física del juego sea estable y receptiva. Es para desarrolladores cuyos objetos vibran, atraviesan paredes o se sienten flotantes.
Cuándo usarla
- ✓Cuando los objetos vibran o tiemblan cuando deberían quedarse quietos.
- ✓Cuando los objetos rápidos atraviesan las paredes, lo que se llama atravesamiento.
- ✓Cuando necesitas ajustar gravedad, masa, arrastre o capas de colisión para que el movimiento se sienta bien.
Link de la skill
https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/disciplines/physics-tuning/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Mis balas rápidas atraviesan paredes finas y mis cajas apiladas vibran. ¿Puedes ajustar la configuración de física?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente pasa el trabajo de física a un paso de tiempo fijo, interpola las posiciones dibujadas entre pasos y activa la detección de colisiones continua para los objetos rápidos. También ajusta la masa, el arrastre y las capas de colisión para eliminar la vibración.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
Preguntas frecuentes
¿Por qué usar un paso de tiempo fijo?
La skill indica que un paso de física constante mantiene estable la simulación, mientras que un paso variable hace que las colisiones sean inconsistentes.
¿Qué es la detección de colisiones continua?
Es un método que evita que los objetos rápidos atraviesen paredes finas.
¿Cubre la sensación del salto?
Las ayudas de salto como el tiempo de gracia son temas de entrada y de controles, que cubre la skill de entrada.
Detalles
Descripción original del autor
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.
Popularidad
- Estrellas en GitHub
- 6,6 mil
- Posición en el ranking
- #13802
- Licencia
- Apache-2.0
- Actualizada
- 28/10/2026
Comentarios
- …
Más skills de este repositorio
router
6,6 milAyuda a tu agente a elegir la skill de desarrollo de juegos adecuada para cada petición, detectando tu motor y el tipo de tarea que necesitas.
ai-behavior-trees-utility-ai
6,6 milAyuda a tu agente a construir un árbol de comportamiento y un sistema de IA por utilidad para enemigos y personajes que eligen acciones según prioridad y puntuación.
audio-design
6,6 milEnseña a tu agente la mezcla de audio de juegos: buses, volumen en decibelios, ducking bajo los diálogos, música adaptativa y variación de efectos de sonido.
camera-systems
6,6 milAyuda a tu agente a crear cámaras de juego que siguen con suavidad, se mantienen dentro del nivel y orbitan o miran alrededor en 3D.
Skills parecidas
diffs
394 milPermite que tu agente genere un diff real y compartible de los cambios, como enlace de visualización o archivo de imagen, en lugar de un resumen escrito a mano.
coding-agent
394 milAyuda a tu agente a pasar un trabajo de programación grande a Codex, Claude Code u OpenCode como trabajador en segundo plano, y después revisar su progreso.
gh-issues
394 milAyuda a tu agente a encontrar incidencias de GitHub, elegir cuáles trabajar y abrir pull requests con correcciones, incluido el seguimiento de los comentarios de revisión.