r3f-physics

Simulate physics in React Three Fiber scenes with Rapier.

108|7|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/EnzeD/r3f-skills --skill r3f-physics-enzed
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: r3f-physics
Source: https://github.com/EnzeD/r3f-skills/tree/main/skills/r3f-physics
Command: npx skills add https://github.com/EnzeD/r3f-skills --skill r3f-physics-enzed

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

React Three Fiber projects often require realistic physics to simulate motion, collisions, and interactions; this skill provides an integrated Rapier-based physics layer that handles gravity, rigid bodies, sensors, and joints within R3F.

Core Features & Use Cases

  • Real-time physics simulation with rigid bodies, colliders, joints, forces, and sensors for interactive 3D scenes.
  • Declarative API using Physics, RigidBody, CuboidCollider, and related components to embed physics in games, visualizations, or simulations.
  • Debugging, event handling, and constraint-based interactions enabling triggers and collision-driven behaviors.

Quick Start

Create a Canvas with a Physics world and add a dynamic RigidBody and a Collider to start simulating physics.

Frequently Asked Questions about r3f-physics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add realistic physics to a React Three Fiber scene?

You can add physics to React Three Fiber by integrating a Rapier physics layer that handles gravity, collisions, and constraints using declarative components like Physics, RigidBody, and CuboidCollider.

Can I simulate joints and sensors in R3F for interactive 3D experiences?

Yes, you can simulate joints and sensors in R3F to create interactive 3D experiences. The physics layer supports force-driven behaviors, triggers, and collision-driven events across dynamic rigid bodies and constraints.

Do I need @react-three/rapier to set up rigid body collisions in R3F?

Yes, you need @react-three/rapier and a compatible React setup to simulate rigid body collisions. This dependency provides the API to embed physics simulations, colliders, and constraints into your 3D scenes.

What is the best way to handle collision events and debugging in React Three Fiber physics?

The best way to handle collision events and debugging in React Three Fiber physics is using a declarative Rapier API, which enables trigger-based interactions, constraint-based behaviors, and built-in debugging for dynamic bodies.

How do I create a dynamic RigidBody and Collider in React Three Fiber?

To create a dynamic RigidBody and Collider in React Three Fiber, set up a Canvas with a Physics world and embed these declarative components to start simulating real-time motion and collisions immediately.