Agent skill

Physics Tuning

by ukanwat in ukanwat/overtime

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…

Apache-2.0Auto-check passedGame Development

Install Physics Tuning

skills CLI
$ npx skills add ukanwat/overtime --skill physics-tuning -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ukanwat/overtime physics-tuning --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ukanwat/overtime.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/physics-tuning .claude/skills/physics-tuning && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
physics-tuning
GitHub stars
387
Used in
1 other repo
Token cost
~1.9k tokens
SKILL.md length
594 words
Files
2 (incl. references)
Skills in repo
21
Repo updated
First seen
Licence
Apache-2.0

At a glance

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…

  • Works in 4 steps: Fixed timestep for simulation, render… → Stop tunneling: CCD + a speed cap → Body tuning: mass, drag, gravity scale,… → …
  • The user mentions physics feel
  • SKILL.md covers When to use, Core workflow, Patterns and Pitfalls, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Physics Tuning is an agent skill from ukanwat/overtime. 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.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/timestep-and-ccd.md`). Compatibility notes: Engine-agnostic concepts. Pairs with godot-physics (physicsprocess) and unity-physics (FixedUpdate, Rigidbody); snippets in GDScript/C-like pseudocode.

It sits in Game Development. The repository describes itself as: Give a coding agent a brief, not a chat, and it works on its own across sessions. Includes an example run: an open-world city built in a real game engine with no human help. In… The licence is Apache-2.0.

When your agent uses it

  • The user mentions physics feel
  • Bouncing/unstable physics
  • Collision layers

Example prompts

  • “/physics-tuning”

Requirements

  • Compatibility (from SKILL.md): Engine-agnostic concepts. Pairs with godot-physics (_physics_process) and unity-physics (FixedUpdate, Rigidbody); snippets in GDScript/C#-like pseudocode.

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Fixed timestep for simulation, render interpolation for smoothness
  2. Stop tunneling: CCD + a speed cap
  3. Body tuning: mass, drag, gravity scale, material
  4. Collision layers and masks (who collides with whom)

What it can do on your machine

Read from SKILL.md and the folder at commit eac84e0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are gdscript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Engine-agnostic concepts. Pairs with godot-physics (_physics_process) and unity-physics (FixedUpdate, Rigidbody); snippets in GDScript/C#-like pseudocode.

    From compatibility in the SKILL.md frontmatter.

Context cost

Physics Tuning loads about 1.9k tokens when it runs, and up to ~3.1k if it reads all its reference files. Until then it costs about 98 tokens; SKILL.md has 594 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~98
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ukanwat/overtime at commit eac84e0, republished under its Apache-2.0 licence (© ukanwat). 594 words, ~1,949 tokens.

Download SKILL.mdSave it as .claude/skills/physics-tuning/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
physics-tuning
description
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.
compatibility
Engine-agnostic concepts. Pairs with godot-physics (_physics_process) and unity-physics (FixedUpdate, Rigidbody); snippets in GDScript/C#-like pseudocode.
license
Apache-2.0
metadata.engine
none
metadata.category
disciplines
metadata.difficulty
intermediate

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

  1. Run physics on a fixed timestep. Simulate at a constant rate (e.g. 50–60 Hz). A fixed dt makes the simulation deterministic-ish and stable; a variable dt makes integration and collisions inconsistent.
  2. 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's dt.
  3. 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.
  4. Tune the body, not the scene. Set mass for relative weight, drag for damping, gravity scale per object, and restitution/friction via materials.
  5. Stop tunneling with CCD on small/fast bodies; cap maximum velocity.
  6. Stabilize stacks/joints with more solver iterations, sane mass ratios, and sleeping for resting bodies.
  7. 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
gdscript
# 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 physics_interpolation/Rigidbody interpolate; Unity Rigidbody.interpolation = Interpolate). Prefer the built-in before hand-rolling.

2. Stop tunneling: CCD + a speed cap
gdscript
# Fast, small bodies skip past thin colliders between ticks. Two fixes:
body.continuous_cd = true            # RigidBody3D bool (RigidBody2D: CCD_MODE_* enum). Unity: rb.collisionDetectionMode = Continuous
# 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
gdscript
# Mass is RELATIVE weight in collisions; it does NOT change fall speed (gravity
# accelerates all masses equally). Use drag and gravity_scale to shape feel.
body.mass = 2.0                      # heavier pushes lighter in collisions
body.linear_damp = 0.5               # air drag: higher = stops sooner (Unity: drag)
body.gravity_scale = 1.5             # per-object gravity multiplier (snappier fall)
# Bounce/slide come from the physics material, not code:
material.bounce = 0.2                # restitution 0..1 (Unity: bounciness)
material.friction = 0.8              # surface grip
Show full SKILL.md (234 more words)Show less
4. Collision layers and masks (who collides with whom)
gdscript
# A body is ON its layer(s) and SCANS the layers in its mask. Both directions of a
# pair must be configured for them to interact.
player.collision_layer = LAYER_PLAYER
player.collision_mask  = LAYER_WORLD | LAYER_ENEMY     # player detects world+enemies
pickup.collision_layer = LAYER_PICKUP
pickup.collision_mask  = LAYER_PLAYER                  # pickup only reacts to player
# Unity equivalent: assign GameObject layers and edit the Physics collision matrix
# (or Physics.IgnoreLayerCollision). Keep a named layer constant table, not magic numbers.

Pitfalls

  • Applying forces/movement in the render frame (Update/_process) makes behavior frame-rate dependent — faster PCs run faster, and collisions get flaky. Do simulation in the fixed step.
  • Visible jitter even with a fixed step usually means no render interpolation: the physics rate and display rate beat against each other. Enable interpolation.
  • Tunneling through thin walls: discrete collision misses fast movers. Enable CCD, cap speed, thicken walls, or raise the physics rate.
  • Expecting heavier objects to fall faster. Gravity is acceleration; mass affects collision response, not fall speed. Use gravity_scale/drag for feel.
  • Exploding stacks / jittery joints: mass ratios too extreme, or too few solver iterations. Keep mass ratios modest and raise iteration counts.
  • Bodies that never rest burn CPU and twitch. Enable sleeping and a sensible sleep threshold for resting objects.
  • One-directional layer setup: A's mask includes B but B's mask excludes A. Detection/collision can need both sides; verify the full matrix.
  • Huge dt spikes (load hitches, breakpoints) blow up integration. Clamp the max physics step / substep count so a stall doesn't launch everything.

References

  • references/timestep-and-ccd.md — the fixed-timestep accumulator loop, interpolation math, substepping, CCD modes, solver/iteration tuning, sleeping, and a stability checklist.
  • godot-physics, unity-physics — concrete bodies, colliders, and callbacks.
  • input-systems — responsive controls, jump buffering, coyote time.
  • game-ai — agent movement that must agree with the physics step.
  • platformer, fps-shooter — genres whose feel depends on this tuning.

© ukanwat, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .claude/skills/physics-tuning of ukanwat/overtime.

  • SKILL.md
  • references/timestep-and-ccd.md

Open the folder on GitHubat commit eac84e0

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in ukanwat/overtime, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Physics Tuning next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Physics Tuning compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Physics Tuning this skillukanwat/overtime3871 repos~1.9kAutomated safety check: PassApache-2.0
Image to Three.js Modelimg2threejs/img2threejs18k1 repos~8.2kAutomated safety check: PassApache-2.0
Web CloneJane-xiaoer/claude-skill-web-clone1k1 repos~2.7kAutomated safety check: PassMIT
Threejs Game Directormajidmanzarpour/threejs-game-skills2.5k—~2.2kAutomated safety check: PassMIT
Game Asset Generatorhtdt/godogen7.1k—~2.8kAutomated safety check: PassMIT
Threejs Gameplay Systemsvalkor-ai/loom1.2k1 repos~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Image to Three.js Model

    img2threejs/img2threejs

    Rebuilds the object in a reference image as a procedural, animation-ready Three.js model written entirely in code, using staged sculpting with quality checks.

    18k GitHub starsUsed in 1 repo~8.2k tokens
    Game DevelopmentAuto-check passed
  • Web Clone

    Jane-xiaoer/claude-skill-web-clone

    网站复刻 / 克隆方法论。USE WHEN 用户说 复刻网站、克隆网站、clone website、抄个站、仿站、 照着这个站做一个、reproduce site、还原某个网页效果、把这个站搬下来改成我的、 复刻某个交互/WebGL/Canvas/Three.js 效果。提供「先拿真源码 → 判路径 → 逆向拆解 → 搭工程 → 替换内容」的可移植决策树,覆盖静态站 /…

    1k GitHub starsUsed in 1 repo~2.7k tokens
    Game DevelopmentAuto-check passed
  • Threejs Game Director

    majidmanzarpour/threejs-game-skills

    Entrypoint for building, upgrading, and finishing Three.js browser games.

    2.5k GitHub stars~2.2k tokensUpdated 11 days ago
    Game DevelopmentAuto-check passed
  • Generates game art from text prompts: PNG images, GLB 3D models, rigged characters, animations and sprites, with background removal.

    7.1k GitHub stars~2.8k tokensUpdated 7 days ago
    Game DevelopmentAuto-check passed
  • Build and iterate playable Three.js game systems: starter scaffold, architecture, design briefs, core loops, level and encounter design, entities, input, camera, collision and physics, scoring…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed
  • Uloop Execute Dynamic Code

    CyberAgentGameEntertainment/NovaShader

    Execute C with Unity APIs when existing uloop tools cannot inspect or edit enough.

    1.6k GitHub starsUsed in 1 repo~1.9k tokens
    Game DevelopmentAuto-check passed

More from ukanwat/overtime

All 21 skills in this repo
  • Audio Design

    ukanwat/overtime

    Implement game audio practice — bus/mixer architecture and gain in decibels, ducking (sidechain), adaptive/dynamic music via layering and re-sequencing, SFX variation, and beat synchronization.

    387 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Camera Systems

    ukanwat/overtime

    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…

    387 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Dialogue Systems

    ukanwat/overtime

    Build branching dialogue and narrative — a node/choice graph with conditions, variables, and localization hooks — and choose between authoring tools Ink and Yarn Spinner or a custom data-driven…

    387 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Game AI

    ukanwat/overtime

    Design NPC and enemy decision-making with finite state machines, behavior trees, steering behaviors, and A pathfinding — engine-neutral algorithms that pair with the detected engine's navigation API.

    387 GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Game Feel

    ukanwat/overtime

    Add "juice" and game feel that makes actions satisfying — screen shake, hit-stop/freeze frames, tweened/eased motion, squash & stretch, knockback, and layered audio-visual feedback — as…

    387 GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Game UI UX

    ukanwat/overtime

    Design and build game UI/UX — HUDs, menus, and overlays — that survive every screen: anchor- based responsive layout, resolution/aspect scaling and safe areas, keyboard/gamepad focus navigation, a…

    387 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Questions about Physics Tuning

What does Physics Tuning do?

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…. Physics Tuning is an agent skill from ukanwat/overtime. 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.

When should I use Physics Tuning?

Physics Tuning fits situations like: the user mentions physics feel; bouncing/unstable physics; collision layers.

How do I install Physics Tuning in Claude Code?

Run `npx skills add ukanwat/overtime --skill physics-tuning -a claude-code`. Or copy the skill folder (.claude/skills/physics-tuning in ukanwat/overtime) into .claude/skills/physics-tuning in your project. Claude Code loads it when a task matches its description.

How do I install Physics Tuning in Codex?

Run `npx skills add ukanwat/overtime --skill physics-tuning -a codex`. Or copy the skill folder (.claude/skills/physics-tuning in ukanwat/overtime) into .agents/skills/physics-tuning in your project. Codex loads it when a task matches its description.

Can I use Physics Tuning in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ukanwat/overtime --skill physics-tuning -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/physics-tuning, .gemini/skills/physics-tuning, .github/skills/physics-tuning and .opencode/skills/physics-tuning in your project.

What does Physics Tuning need to run?

SKILL.md names no scripts, command-line tools or credentials: Physics Tuning is instructions for the agent only. Compatibility (from SKILL.md): Engine-agnostic concepts. Pairs with godot-physics (_physics_process) and unity-physics (FixedUpdate, Rigidbody); snippets in GDScript/C#-like pseudocode..

Does Physics Tuning access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Physics Tuning safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Physics Tuning use?

Physics Tuning is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Physics Tuning use?

About 1.9k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.1k tokens, read only when the agent opens those files.

What are the alternatives to Physics Tuning?

Skills that share tags, products or a category with Physics Tuning: Image to Three.js Model (img2threejs/img2threejs, 18k stars), Web Clone (Jane-xiaoer/claude-skill-web-clone, 1k stars), Threejs Game Director (majidmanzarpour/threejs-game-skills, 2.5k stars) and Game Asset Generator (htdt/godogen, 7.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Physics Tuning?

ukanwat (a GitHub user) maintains it in ukanwat/overtime, which has 387 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 8, 2026.

Source: ukanwat/overtime on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.