xb-physics

Integrate Rapier3D physics with gravity, collisions, and depth-aware colliders in XR applications.

455|91|Updated Sep 25, 2025
One-click install
npx skills add https://github.com/google/xrblocks --skill xb-physics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xb-physics
Source: https://github.com/google/xrblocks/tree/main/skills/xb-physics
Command: npx skills add https://github.com/google/xrblocks --skill xb-physics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @dimforge/rapier3d-simd-compat, and includes scripts (resource) components.

What problem does it solve?

This Skill adds realistic physics to XR experiences, enabling objects to interact with the environment through gravity, collisions, and depth-aware geometry.

Core Features & Use Cases

  • Rigid-Body Physics: Integrate Rapier3D for physics simulation, including gravity and collisions.
  • Depth-Aware Collisions: Use depth-mesh colliders for accurate object interactions with the real environment.
  • Use Case: Create immersive XR applications where objects interact with the environment in a lifelike manner, such as ball pits or interactive physics-based games.

Quick Start

Initialize physics in your XR Blocks app with Rapier3D by setting options.physics.RAPIER = RAPIER in your script.

Frequently Asked Questions about xb-physics

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

FAQPage Schema
How do I add realistic physics to an XR experience?

To add realistic physics to an XR experience, integrate Rapier3D by setting `options.physics.RAPIER = RAPIER` in your script to enable gravity and rigid-body collisions.

Can I use depth-mesh colliders for real environment interactions in immersive apps?

Yes, you can use depth-mesh colliders for accurate object interactions with the real environment, allowing virtual items to collide naturally with physical surroundings.

What is the best way to enable gravity and collisions in XR Blocks?

The best way to enable gravity and collisions in XR Blocks is integrating Rapier3D, which provides rigid-body physics simulation specifically designed for immersive XR applications.

Does Rapier3D support creating interactive physics-based games for XR?

Yes, Rapier3D supports creating interactive physics-based games and simulations for XR by handling realistic object interactions with gravity, collisions, and depth-aware geometry.