Skip to content
Back to skills

3d Physics Game

ASecurity

Build responsive 3D browser games, character controllers, and interactive physics simulations with React Three Fiber (@react-three/rapier) and Three.js (cannon-es). Use when creating 3D platformers, arcade games, vehicle physics, kinematic obstacles, or collision systems.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 12, 2026
ai-agentsreactapi

Works with

  • api

Security analysis

A100/100

Scanned November 12, 2026

npx -y skills add AkilLabs/web3d-studio --skill 3d-physics-game --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 3d Physics Game?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 3d Physics Game
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/akillabs-3d-physics-game/badge)](https://www.skillsdirectory.com/skills/akillabs-3d-physics-game)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: 3d-physics-game
description: Build responsive 3D browser games, character controllers, and interactive physics simulations with React Three Fiber (@react-three/rapier) and Three.js (cannon-es). Use when creating 3D platformers, arcade games, vehicle physics, kinematic obstacles, or collision systems.
---
# 3d-physics-game

Build 3D browser games that feel crisp, responsive, and deterministic across 60Hz and 120Hz displays.

## Core Engineering Rules for 3D Web Games

1. **Interpolate the physics timestep**: Always enable `<Physics interpolate timeStep={1 / 60} gravity={[0, -22, 0]}>` so visual meshes interpolate smoothly between physics ticks on 120Hz monitors, and use crisp arcade gravity (`-20` to `-25`) so jumps never feel floaty.
2. **Drive player velocity, not raw forces**: Applying raw `addForce` for WASD movement feels like skating on ice. Read normalized input vectors, damp `linvel.x` and `linvel.z` with `THREE.MathUtils.damp(currentVel, targetVel, 15, delta)`, and preserve `linvel.y` for gravity.
3. **Implement zero-allocation raycast ground checks + coyote time**: Hoist or memoize a single `rapier.Ray` instance in `useRef` and mutate its origin coordinates each frame rather than calling `new rapier.Ray(...)`. Cast a short downward ray (`0.25` units) from capsule bottom. Allow jumping within `120ms` of leaving a ledge (coyote time) and buffer jump presses `120ms` before landing.
4. **Use `kinematicPosition` for moving obstacles**: Never mutate `mesh.position` inside a `<RigidBody>`. Drive moving platforms and rotating hazards via `body.setNextKinematicTranslation()` and `body.setNextKinematicRotation()`.
5. **Pre-allocate all math vectors and linvel targets outside `useFrame`**: Hoist camera offset, player position, input direction, and `{ x, y, z }` velocity scratch objects to module scope so garbage collection never triggers frame drops during gameplay.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.