physics

Build and debug Lens Studio physics scenes with bodies, colliders, constraints, and raycasts.

16|2|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/lens-studio-devs/ls-extensions --skill physics-lens-studio-devs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: physics
Source: https://github.com/lens-studio-devs/ls-extensions/tree/main/plugins/ls-clad/skills/physics
Command: npx skills add https://github.com/lens-studio-devs/ls-extensions --skill physics-lens-studio-devs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Lens Studio physics bugs usually come from skipping one of the three layers (world, body/collider, constraint) or from undocumented behaviors like read-only default world settings, hollow mesh colliders, and hinge axes defaulting to local Y. This Skill encodes the correct setup rules, API surface, and debugging recipes so physics scenes work the first time. ## Core Features & Use Cases - Three-layer setup model: Configure WorldSettingsAsset (gravity, simulation rate, Ground Is Zero), BodyComponent/ColliderComponent (shapes, matter, filters), and ConstraintComponent (Fixed/Point/Hinge) with the correct wiring order. - Collider fitting recipes: Bbox-driven measurement, pivot-wrapper pattern for off-center meshes, shape selection rules (cylinder vs capsule for upright objects), and skinned-mesh colliders for face/hand/world mesh AR physics. - Pattern library: Eleven composable patterns including drag-to-move, trigger zones, continuous force fields, ragdoll chains, compound bodies, and multi-world slow-mo setups. - Use Case: A user asks to make a bowling game where the ball launches on tap and knocks over pins. The Skill provides the VelocityChange launch pattern, cylinder-shaped pins (not capsules), simulationRate raised to 120 to prevent tunneling, and multiplicative matter settings so bounces actually work. ## Quick Start Ask the agent to add a dynamic physics body to an existing mesh in your Lens Studio project and make it launch upward when the screen is tapped.

Frequently Asked Questions about physics

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

FAQPage Schema
How do I add physics to an object in Lens Studio?

Add a BodyComponent for dynamic objects or a ColliderComponent for static ones, then assign a shape (Box, Sphere, Capsule, Cylinder, Cone, or Mesh). For fresh primitives, use a PhysicsObjectPreset which comes pre-wired with mesh, body, and matching shape.

How do I make a draggable physics object in Lens Studio?

Raycast from the camera on touch start, create an invisible intangible target collider, and attach it to the hit body with body.addPointConstraint. Move the target on touch move and call body.removeConstraint on release so the body keeps its release velocity.

Why do fast objects tunnel through colliders in Lens Studio?

Lens Studio has no continuous collision detection, so bodies thinner than about 10 cm pass through static colliders at high speed. Raise worldSettings.simulationRate to 120 or 240, or set absoluteSpeedLimit to clamp velocity.

Why does Physics.getRootWorldSettings return null?

The root world's default settings are uneditable, so getRootWorldSettings returns null until you create your own WorldSettingsAsset and assign it to the Scene asset's physicsRootSettings field. Writes to the implicit default silently no-op.

Can physics bodies collide with the face mesh in Lens Studio?

Yes, using a ColliderComponent with a Mesh shape where both shape.mesh and shape.skin are set so the collider follows the deforming mesh. Skinned colliders cannot be dynamic, and fast bodies may tunnel through them since they are hollow shells.

Why does my bounce not work even with high bounciness?

Matter coefficients combine multiplicatively between the two contact surfaces, so a bouncy ball against a wall with no matter assigned produces zero bounce. Set bounciness on both surfaces or assign a high-bounciness defaultMatter on the world settings.