iwsdk-physics
Skill1 starsChanged 31 days agoMITView on GitHub
Add or repair IWSDK rigid-body simulation, collision shapes, forces, and physics-aware grabbing. Use for gravity, falling, collision, bouncing, kinematic motion, or physics tuning.
In this repository58 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- cf-cliSkill
- durable-objectsSkill
- game-gdd-authorSkill
- game-playtestSkill
- pmndrs-handleSkill
- pmndrs-pointer-eventsSkill
- pmndrs-uikitSkill
- prototype-fastSkill
- pwa-offlineSkill
- review-game-trailerSkill
- scenario-blender-expertSkill
- scenario-blender-retopologySkill
- scenario-blender-uv-bakingSkill
- threejs-perf-loadingSkill
- webapp-testingSkill
- workers-best-practicesSkill
- wranglerSkill
- xr-perceptual-constraints-displays-and-trackingSkill
- xr-platforms-audio-and-comfortSkill
- xr-referenceSkill
- xr-rendering-input-and-spatial-understandingSkill
- xr-ux-design-and-performance-budgetingSkill
- horizon-launch-roadmapSkill
- horizon-store-listing-assetsSkill
- horizon-web-store-publishSkill
- horizon-web-vrc-checklistSkill
- iwsdk-asset-pipelineSkill
- iwsdk-dev-workflowSkill
- iwsdk-performanceSkill
- iwsdk-project-setupSkill
- iwsdk-quest-device-testingSkill
- iwsdk-testingSkill
- iwsdk-vr-glassesSkill
- quest-browser-webxrSkill
- iwsdk-build-modelSkill
- iwsdk-compose-sceneSkill
- iwsdk-debugSkill
- iwsdk-depth-occlusionSkill
- iwsdk-devSkill
- iwsdk-grabSkill
- iwsdk-hostingSkill
- iwsdk-migrate-0-5Skill
- iwsdk-native-xr-testSkill
- iwsdk-pwa-packagingSkill
- iwsdk-raySkill
- iwsdk-uiSkill
- hz-immersive-designerSkill
- hz-iwsdk-webxrSkill
- hz-new-project-creationSkill
- hz-perfetto-debugSkill
- hz-quest-verify-firstSkill
- hz-simpleperf-debugSkill
- hz-store-pwaSkill
- hz-store-submitSkill
- hz-vr-debugSkill
- metavr-cliSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Use the current request as the specification.
- Very specific: line 24
Every colliding entity needs both PhysicsBody and PhysicsShape:
- Distinctive: line 33
Add only requested material tuning.
- Distinctive: line 49
Read one bundled reference only when needed.
- Distinctive: line 57
Run the production build once.
- Distinctive: line 63
Use the documented CLI shape directly.
- Distinctive: line 74
If a gravity body has already settled by the time the bridge is ready, its resting transform plus a zero-motion stepped diff is valid …
- Distinctive: line 76
Do not teleport the body solely to recreate the fall.
- Very specific: line 78
Use an options object when you need to select the execution mode or simulation rate.
- Distinctive: line 88
Only enable physics when needed: If no objects require dynamic simulation, omit it to avoid overhead.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
IWSDK Physics
Use the current request as the specification. Prefer the scaffold's project manifest and native scene components over rebuilding physics in TypeScript.
Implement the smallest complete physics path
- Inspect
iwsdk.config.json, the active scene, and only the source file that owns any requested custom behavior. Make the complete first config/asset/scene edit before starting the dev server. The contracts below are sufficient for the common path: do not callscene capabilities, CLI--help, searchnode_modules, or inspect generated declarations unless a concrete build/runtime error remains after that edit. - Set
world.features.physicstotrue. The scaffold registersPhysicsSystem,PhysicsBody,PhysicsShape, andPhysicsManipulation; do not register them again unless the project deliberately replaced bootstrap. Every colliding entity needs both
PhysicsBodyandPhysicsShape:- moving under simulation:
PhysicsBody.state: "DYNAMIC"; - fixed floor or wall:
PhysicsBody.state: "STATIC"; - code-driven moving platform:
PhysicsBody.state: "KINEMATIC".
- moving under simulation:
- Match shapes to visible geometry. Use
Sphere,Box, orCylinderwith explicit dimensions for primitives. UseConvexHullfor a dynamic complex mesh and reserveTriMeshfor static geometry. - Add only requested material tuning. Start with low restitution and moderate friction; avoid compensating for a missing collider with extreme damping.
- For a throwable object, combine a dynamic body and shape with the requested
grab component.
OneHandGrabbableis proximity squeeze; a distance grab also requiresRayInteractableandDistanceGrabbable. - Apply a one-shot force or velocity through
PhysicsManipulation. For a reset/teleport of an existing body, usePhysicsSystem.setBodyTransformso Havok and the render transform remain synchronized.
For simple primitive assets, import Mesh, SphereGeometry, BoxGeometry,
and MeshStandardMaterial from @iwsdk/core, construct parentless meshes, and
add those mesh values directly to the existing defineAssets({...}) map. Keep
the render geometry and collider dimensions identical: a sphere of radius r
uses PhysicsShape: { shape: "Sphere", dimensions: [r, 0, 0] }; a box sized
[w, h, d] uses { shape: "Box", dimensions: [w, h, d] }.
Read one bundled reference only when needed; do not read the complete set:
- exact component fields and dimensions:
references/component-reference.md; - implementation patterns:
references/workflows.md; - material or system tuning:
references/tuning-and-config.md.
Verify behavior, not just source
Run the production build once. Start the app once and inspect the named live
entities. For falling, collision, force, or kinematic behavior, pause before the
interesting transition, take a before snapshot, step a small fixed number of
frames, take an after snapshot, and diff them. Query the final transform and
physics state. Capture one final runtime image when spatial layout matters.
Use the documented CLI shape directly; do not call help to rediscover it:
npx @iwsdk/cli ecs pause --input-json '{}'
npx @iwsdk/cli ecs snapshot --input-json '{"label":"before"}'
npx @iwsdk/cli ecs step --input-json '{"count":8,"delta":0.016}'
npx @iwsdk/cli ecs snapshot --input-json '{"label":"after"}'
npx @iwsdk/cli ecs diff --input-json '{"from":"before","to":"after"}'
npx @iwsdk/cli ecs resume --input-json '{}'If a gravity body has already settled by the time the bridge is ready, its resting transform plus a zero-motion stepped diff is valid collision evidence. Do not teleport the body solely to recreate the fall.
Use an options object when you need to select the execution mode or simulation rate. Worker execution is the default; useWorker: false runs the same physics runtime and protocol on the main thread for compatibility and diagnostics.
"physics": {
"useWorker": true,
"updateFrequency": 60,
"interpolation": true
}Only enable physics when needed. If no objects require dynamic simulation, omit it to avoid overhead.
For a newly composed test fixture, run scene render-file on the authored hero
view once and inspect at most that one image. After a valid, readable hero,
do not call scene open, scene state, or scene screenshot, and do not create
alternate editor views. Save the final live browser screenshot to a file but do
not read it back when the ECS measurements already prove the requested motion.
Pure rigid-body verification does not require entering XR. The authored hero
view is composition evidence, while the live browser camera can differ. Do not
temporarily edit iwsdk.config.json, restart the runtime, or render extra camera
angles solely to make a screenshot match the hero view. Save the live capture
directly with npx @iwsdk/cli browser screenshot --output-file <path> and let the
authored render cover deliberate framing.
Make at most one focused correction, then replay the same observation. Stop when the requested bodies, collisions, and final state are evidenced. Resume ECS time and leave the app in a stable state.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

