Unity Physics Queries
Unity physics query correctness patterns. Catches common mistakes with Raycast, SphereCast, OverlapSphere, NonAlloc allocation, LayerMask construction, trigger interaction, hit ordering, and query type selection. PATTERN format: WHEN/WRONG/RIGHT/GOTCHA. Based on Unity 6.3 LTS.
Install
npx skills add Nice-Wolf-Studio/unity-claude-skills --skill unity-physics-queriesgit clone --depth 1 https://github.com/Nice-Wolf-Studio/unity-claude-skills.git /tmp/unity-claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/unity-claude-skills/skills/unity-physics-queries ~/.claude/skills/unity-physics-queriesPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Physics Query Patterns -- Correctness Patterns
> **Prerequisite skills:** `unity-physics` (Rigidbody, colliders, raycasting API), `unity-foundations` (layers, GameObjects)
These patterns target the most common physics query bugs: using the wrong query type, misunderstanding allocation, and ignoring subtle defaults that cause silent failures.
---
## PATTERN: Query Type Selection
WHEN: Choosing which physics query to use
WRONG (Claude default):
```csharp
// Always defaulting to Raycast for everything
Physics.Raycast(origin, direction, out hit, maxDistance);
```
RIGHT -- use the decision tree:
```
Need to detect...
|
+-- "Is anything there?" (binary yes/no)
| --> CheckSphere, CheckBox, CheckCapsule (returns bool, cheapest)
|
+-- "What's the nearest thing along a line?"
| --> Raycast (single closest hit along an infinitely thin line)
|
+-- "What's the nearest thing along a volume?"
| --> SphereCast, BoxCast, CapsuleCast (sweep a shape, single closest hit)
|
+-- "Everything along a line?"
| --> RaycastAll / RaycastNonAlloc (all hits, not just closest)
|
+-- "Everything inside an area?"
--> OverlapSphere, OverlapBox, OverlapCapsule (all colliders in region)
```
GOTCHA: `Raycast` only returns the **closest** hit. If you need to pierce through multiple objects, use `RaycastAll` or `RaycastNonAlloc`. If you need to detect everything in an area (like an explosion radius), `OverlapSphere` is correct -- NOT `SphereCast`.
---Details
- Skill name
unity-physics-queries- Repository
- Nice-Wolf-Studio/unity-claude-skills
- Path
skills/unity-physics-queries/SKILL.md- License
- MIT
- Repo updated
- 15 September 2026
FAQ
What does the Unity Physics Queries skill do?
Unity physics query correctness patterns. Catches common mistakes with Raycast, SphereCast, OverlapSphere, NonAlloc allocation, LayerMask construction, trigger interaction, hit ordering, and query type selection. PATTERN format: WHEN/WRONG/RIGHT/GOTCHA. Based on Unity 6.3 LTS.
How do I install the Unity Physics Queries skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add Nice-Wolf-Studio/unity-claude-skills --skill unity-physics-queries. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Unity Physics Queries popular?
It lives in Nice-Wolf-Studio/unity-claude-skills, which has 40 GitHub stars and 6 forks.
Related skills
Unity 2d
40Nice-Wolf-Studio/unity-claude-skills
Unity 6 2D game development guide. Use when building 2D games, working with sprites, sprite atlas, SpriteRenderer, tilemaps, 2D physics (Rigidbody2D, Collider2D), 2D lighting, sorting layers, or sorting groups. Based on Unity 6.3 LTS documentation.
Unity 3d Math
40Nice-Wolf-Studio/unity-claude-skills
Unity 3D math correctness patterns. Catches common mistakes with coordinate spaces, Quaternion, Vector3, Plane, Bounds, Transform hierarchies, raycasting projection, and floating-point precision. PATTERN format: WHEN/WRONG/RIGHT/GOTCHA. Based on Unity 6.3 LTS documentation.
Unity AI Navigation
40Nice-Wolf-Studio/unity-claude-skills
Unity 6 AI and navigation guide. Use when working with NavMesh, pathfinding, NavMeshAgent, NavMeshSurface, NavMeshObstacle, off-mesh links, or Unity Sentis (ML model inference). Covers AI navigation package, runtime NavMesh baking, and common AI patterns like state machines and behavior trees. Based on Unity 6.3 LTS documentation.
Verify Skill
43NeuroAIHub/awesome_cognitive_and_neuroscience_skills
Interactive skill verification — assess accuracy of parameters, citations, and methodology through structured expert review
Unity Physics
40Nice-Wolf-Studio/unity-claude-skills
Unity 6 physics development guide. Use when working with Rigidbody, colliders, raycasting, triggers, collisions, joints, or physics simulation. Covers PhysX 5 (3D) and Box2D (2D) physics, FixedUpdate timing, layer masks, and contact data. Based on Unity 6.3 LTS documentation.
Pymatgen
49UCSB-NLP-Chang/Skill-Usage
Materials science toolkit. Crystal structures (CIF, POSCAR), phase diagrams, band structure, DOS, Materials Project integration, format conversion, for computational materials science.
Browse the most popular Claude skills, all research & science skills, or write your own with the skills generator.