batihandev/unity-mcp-skills/physics

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when users want to perform raycasts, overlap checks, or configure gravity.

Install

npx vskill@latest install batihandev/unity-mcp-skills/physics

SKILL.md

Physics Skills

Overview

Raycasts, overlap checks, and gravity settings.

Common Mistakes

DO NOT (common hallucinations):

  • physics_add_rigidbody / physics_add_collider do not exist → use component_add with componentType "Rigidbody"/"BoxCollider"/etc.
  • physics_simulate does not exist → physics simulation runs during Play mode
  • Raycast results use world-space coordinates

Routing:

  • For adding physics components → use component module
  • For physics material → use physics_create_material (this module)
  • For layer collision matrix → physics_set_layer_collision (this module)

Skills

physics_raycast

Cast a ray and get hit info. Parameters:

  • originX, originY, originZ (float): Origin point.
  • dirX, dirY, dirZ (float): Direction vector.
  • maxDistance (float, optional): Max distance (default 1000).
  • layerMask (int, optional): Layer mask (default -1).

Returns: { hit: true, collider: "Cube", distance: 5.2, ... }

physics_check_overlap

Check for colliders in a sphere. Parameters:

  • x, y, z (float): Center point.
  • radius (float): Sphere radius.
  • layerMask (int, optional): Layer mask.
physics_get_gravity

Get global gravity setting. Parameters: None.

physics_set_gravity

Set global gravity setting. Parameters:

  • x, y, z (float): Gravity vector (e.g. 0, -9.81, 0).
physics_raycast_all

Cast a ray and return ALL hits (penetrating).

ParameterTypeRequiredDefaultDescription
originXfloatYes-Ray origin X
originYfloatYes-Ray origin Y
originZfloatYes-Ray origin Z
dirXfloatYes-Direction X
dirYfloatYes-Direction Y
dirZfloatYes-Direction Z
maxDistancefloatNo1000Max ray distance
layerMaskintNo-1Layer mask filter

Returns: { count, hits: [{ objectName, instanceId, path, point, normal, distance }] }

physics_spherecast

Cast a sphere along a direction and get hit info.

ParameterTypeRequiredDefaultDescription
originXfloatYes-Origin X
originYfloatYes-Origin Y
originZfloatYes-Origin Z
dirXfloatYes-Direction X
dirYfloatYes-Direction Y
dirZfloatYes-Direction Z
radiusfloatYes-Sphere radius
maxDistancefloatNo1000Max cast distance
layerMaskintNo-1Layer mask filter

Returns: { hit, objectName, instanceId, point, distance }

physics_boxcast

Cast a box along a direction and get hit info.

ParameterTypeRequiredDefaultDescription
originXfloatYes-Origin X
originYfloatYes-Origin Y
originZfloatYes-Origin Z
dirXfloatYes-Direction X
dirYfloatYes-Direction Y
dirZfloatYes-Direction Z
halfExtentXfloatNo0.5Box half extent X
halfExtentYfloatNo0.5Box half extent Y
halfExtentZfloatNo0.5Box half extent Z
maxDistancefloatNo1000Max cast distance
layerMaskintNo-1Layer mask filter

Returns: { hit, objectName, instanceId, point, distance }

physics_overlap_box

Check for colliders overlapping a box volume.

ParameterTypeRequiredDefaultDescription
xfloatYes-Box center X
yfloatYes-Box center Y
zfloatYes-Box center Z
halfExtentXfloatNo0.5Box half extent X
halfExtentYfloatNo0.5Box half extent Y
halfExtentZfloatNo0.5Box half extent Z
layerMaskintNo-1Layer mask filter

Returns: { count, colliders: [{ objectName, path, isTrigger }] }

physics_create_material

Create a PhysicMaterial asset.

ParameterTypeRequiredDefaultDescription
namestringNo"New PhysicMaterial"Material name
savePathstringNo"Assets"Save directory path
dynamicFrictionfloatNo0.6Dynamic friction value
staticFrictionfloatNo0.6Static friction value
bouncinessfloatNo0Bounciness value

Returns: { success, path }

physics_set_material

Set PhysicMaterial on a collider (supports name/instanceId/path).

ParameterTypeRequiredDefaultDescription
materialPathstringYes-Asset path of the PhysicMaterial
namestringNonullGameObject name
instanceIdintNo0GameObject instance ID
pathstringNonullGameObject hierarchy path

Returns: { success, gameObject, material }

physics_get_layer_collision

Get whether two layers collide.

ParameterTypeRequiredDefaultDescription
layer1intYes-First layer index
layer2intYes-Second layer index

Returns: { layer1, layer2, collisionEnabled }

physics_set_layer_collision

Set whether two layers collide.

ParameterTypeRequiredDefaultDescription
layer1intYes-First layer index
layer2intYes-Second layer index
enableCollisionboolNotrueWhether to enable collision

Returns: { success, layer1, layer2, collisionEnabled }


RunCommand Examples

Recipe path rule: ../../recipes/physics/<command>.md

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
6
Repository forks
1
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/batihandev/unity-mcp-skills/physics/badge)](https://verified-skill.com/skills/batihandev/unity-mcp-skills/physics)

Something wrong with this skill or its page? Tell us.