unity-physics

Run Unity editor-time physics queries and configure gravity, materials, and layer collision settings.

Updated Jun 21, 2026
One-click install
npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-physics-du-qwq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-physics
Source: https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications/tree/main/.agents/skills/unity-skills/skills/physics
Command: npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-physics-du-qwq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Testing physics behavior in Unity normally requires entering Play mode or writing temporary editor scripts. This Skill lets you perform raycasts, overlap checks, and physics configuration directly at editor time through simple skill calls, without running the simulation. ## Core Features & Use Cases - Physics Queries: Cast rays, spheres, and boxes, or check sphere/box overlaps to detect colliders and get hit points, distances, and object names in world space. - Physics Configuration: Get and set global gravity, create PhysicMaterial assets with friction and bounciness values, assign materials to colliders, and read or modify the layer collision matrix. - Use Case: Imagine you are laying out a level and want to verify line of sight from a turret to the player spawn. Call physics_raycast with the origin and direction to instantly confirm whether any collider blocks the path, all without entering Play mode. ## Quick Start Ask the AI to cast a ray downward from position (0, 5, 0) with a max distance of 10 and report what it hits in the Unity scene.

Frequently Asked Questions about unity-physics

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

FAQPage Schema
How do I raycast in the Unity editor without entering Play mode?

Use the physics_raycast skill with origin, direction, and optional maxDistance and layerMask parameters. It runs synchronously on the editor thread and returns hit info including collider name, distance, and world-space point.

How to check for colliders in an area in Unity?

Use physics_check_overlap for a sphere volume or physics_overlap_box for a box volume. Both return the colliders found with object names, hierarchy paths, and trigger flags, and support layer mask filtering.

Can this skill add Rigidbody or Collider components to GameObjects?

No, physics_add_rigidbody and physics_add_collider do not exist. Use the component module's component_add skill with componentType set to Rigidbody, BoxCollider, or similar, then configure physics materials separately.

Does editor-time physics raycast run the physics simulation?

No, these skills only perform single-frame queries and write settings or assets. Real physics simulation including integration and collision response only advances during Play mode, and this module never starts the simulation.

How do I change gravity or layer collision settings in Unity?

Use physics_set_gravity with an x, y, z vector such as 0, -9.81, 0, and physics_set_layer_collision with two layer indices and an enableCollision flag. These are change-type operations that require user grant before executing.