unity-physics

Run Unity editor-time physics raycasts, overlap queries, and configure gravity and collision settings.

2|Updated May 18, 2026
One-click install
npx skills add https://github.com/pcone-mm/NewFPG --skill unity-physics-pcone-mm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-physics
Source: https://github.com/pcone-mm/NewFPG/tree/main/.agents/skills/unity-skills/skills/physics
Command: npx skills add https://github.com/pcone-mm/NewFPG --skill unity-physics-pcone-mm

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 physics queries (raycasts, sphere/box casts, overlap checks) and adjust physics configuration (gravity, PhysicMaterial assets, layer collision matrix) directly at editor time through simple skill calls. ## Core Features & Use Cases - Physics Queries: Cast rays, spheres, and boxes, or check sphere/box overlaps to inspect colliders in the scene without entering Play mode. - Physics Configuration: Get and set global gravity, create PhysicMaterial assets with friction and bounciness values, and assign them to colliders. - Layer Collision Matrix: Query and modify whether two layers collide with each other. - Use Case: While building a level, ask whether anything blocks a straight line between two points — a single physics_raycast call returns the hit collider, distance, and contact point instantly. ## Quick Start Ask the AI to cast a ray downward from position (0, 5, 0) and report what collider it hits and at what distance.

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 an origin point, direction vector, and optional max distance and layer mask. It runs synchronously on the editor thread and returns the hit collider name, distance, and contact point in world-space coordinates.

How to check which colliders overlap a sphere or box in Unity?

Call physics_check_overlap with a center point and radius for spheres, or physics_overlap_box with a center and half extents for boxes. Both return the count and list of overlapping colliders, including object names, hierarchy paths, and trigger flags.

Can this skill add Rigidbody or Collider components to GameObjects?

No, physics_add_rigidbody and physics_add_collider do not exist in this module. Use the component module's component_add skill with componentType set to Rigidbody, BoxCollider, or similar, then return here for physics queries and settings.

Does editor-time physics querying run the physics simulation?

No, this module only performs single-frame queries and writes to assets or global settings. Real physics simulation, including integration and collision response, only advances during Play mode and cannot be stepped from this module.

How do I change gravity or the layer collision matrix 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 enable flag. These are mutating operations that require user approval before the server executes them.