r3f-physics

Integrate Rapier rigid bodies, colliders, and joints into React-Three-Fiber scenes.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/princegarg001/digital-Lige-identifier --skill r3f-physics-princegarg001
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: r3f-physics
Source: https://github.com/princegarg001/digital-Lige-identifier/tree/main/.agents/skills/r3f-physics
Command: npx skills add https://github.com/princegarg001/digital-Lige-identifier --skill r3f-physics-princegarg001

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

React Three Fiber scenes often lack realistic physics; integrate Rapier-based physics (RigidBody, Colliders, Joints) to simulate gravity, collisions, sensors, and dynamic interactions.

Core Features & Use Cases

  • RigidBody components for dynamic and kinematic objects.
  • Various Colliders (cuboid, ball, hull, trimesh) plus manual colliders.
  • Joints (Fixed, Revolute, Spherical, Prismatic, Spring, Rope) for articulated systems.
  • Sensor-based triggers, world access, manual stepping, and debugging tools.

Quick Start

Install @react-three/rapier, wrap your scene with Physics, and add a RigidBody to observe basic movement and collisions.

Frequently Asked Questions about r3f-physics

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

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

To add physics to a React Three Fiber scene, wrap your objects with a Physics component and use RigidBody wrappers. This integrates Rapier to simulate gravity, dynamic collisions, and real-time interactions automatically.

What types of colliders can I use for 3D physics simulations in React Three Fiber?

You can use cuboid, ball, hull, and trimesh colliders for 3D physics simulations in React Three Fiber. The system also supports flexible automatic collider generation and manual collider placement for precise physical boundaries.

Can I create articulated joints like ropes or springs in React Three Fiber physics?

Yes, you can create articulated joints in React Three Fiber physics. The integration supports Fixed, Revolute, Spherical, Prismatic, Spring, and Rope joints to build complex constrained systems and articulated mechanical structures.

Does Rapier physics work with kinematic objects and sensor-based triggers in React Three Fiber?

Rapier physics fully supports kinematic objects and sensor-based triggers in React Three Fiber. RigidBody components handle both dynamic and kinematic objects, while sensors detect intersections to fire event-based triggers without resolving physical collisions.

How do I manually step the physics world or access it directly in React Three Fiber?

You can manually step the physics world and access it directly through provided APIs in React Three Fiber. This allows manual world stepping for custom timing control and direct physics world access for advanced force application.

What is the best way to debug physics colliders and rigidbodies in React Three Fiber?

The best way to debug physics colliders and rigidbodies in React Three Fiber is using the built-in debugging visualization tools. These tools overlay physical collider boundaries and rigidbody states onto your 3D scene to identify intersection issues.