hz-android-2d-porting
Guides porting existing Android 2D apps to Meta Quest and Horizon OS — input adaptation, panel layout, and design requirements. Use when adapting a mobile…
Ensures accurate object placement in Unity projects targeting Meta Quest and Horizon OS by using Renderer and Collider bounds when objects are added, moved, or positioned relative to other objects.
$ npx -y skills add meta-quest/agentic-tools --skill hz-unity-placement --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/hz-unity-placementContext preview
The summary Claude sees to decide when to auto-load this skill.
Ensures accurate object placement in Unity projects targeting Meta Quest and Horizon OS by using Renderer and Collider bounds when objects are added, moved, or positioned relative to other objects.
name: hz-unity-placement license: Apache-2.0 description: Ensures accurate object placement in Unity projects targeting Meta Quest and Horizon OS by using Renderer and Collider bounds when objects are added, moved, or positioned relative to other objects.
This skill ensures that when placing, moving, or positioning Unity GameObjects relative to other objects, proper bounding box calculations are used to prevent overlaps and ensure accurate placement.
Use this skill automatically whenever:
**IMPORTANT**: Proactively invoke this skill immediately when you detect ANY of these patterns:
**Example 1**: "Place all objects on the tables"
**Example 2**: "Put the mug on the table"
**Example 3**: "Place the lamp next to the clock"
**Example 4**: "Position the book 0.5 meters to the left of the pen"
**Example 1**: "Move object to [5, 10, 3]"
**Example 2**: "Set the cube's position to (0, 0, 0)"
**ALWAYS get bounding box information before calculating positions.**
Never assume object sizes - always retrieve actual bounds from Renderer or Collider components using whatever Unity MCP tools are available.
When the user requests object placement: 1. Identify the **target object** (the one being placed/moved) 2. Identify the **reference object** (the one it's being placed relative to) 3. Note the desired **spatial relationship** (on, beside, above, etc.)
For BOTH objects, retrieve bounds using available Unity MCP tools:
1. Find each object in the scene by name or path 2. Query the object's components to extract bounds information 3. Look for `MeshRenderer` or `Collider` components and their `bounds` property
**Understanding bounds types in Unity:**
| Property | Space | Accounts for rotation? | Use when | |----------|-------|----------------------|----------| | `Renderer.bounds` | **World** | Yes (AABB enclosing rotated mesh) | Placing objects in the scene — preferred for placement | | `Renderer.localBounds` | **Local** | No (ignores rotation) | Comparing intrinsic object sizes without rotation effects | | `Collider.bounds` | **World** | Yes (AABB enclosing rotated collider) | Placing objects when no Renderer exists |
**Always prefer world-space bounds** (`Renderer.bounds` or `Collider.bounds`) for placement. These already account for the object's position, rotation, and scale — no manual conversion needed.
**If using world-space bounds** (preferred — from `Renderer.bounds` or `Collider.bounds`):
The values are ready to use directly:
worldCenter = bounds.center // already in world space worldMin = bounds.min // already in world space worldMax = bounds.max // already in world space size = bounds.size // world-space AABB dimensions extents = bounds.extents // half of size
**If using local bounds** (from `Renderer.localBounds` or manual component data):
Convert to world space by adding the object's position:
worldCenter = position + localBounds.center worldMin = worldCenter - (localBounds.size / 2) worldMax = worldCenter + (localBounds.size / 2)
**Note on rotation:** Local bounds ignore rotation. If converting from local bounds on a rotated object, the calculated AABB will not reflect the actual world-space footprint. Prefer world-space bounds whenever possible.
Store these values for each object:
Based on the spatial relationship, calculate the target position:
**On top of*
Agentic skills and tools for Meta Quest and Horizon OS development.
Repo: meta-quest/agentic-tools
Guides porting existing Android 2D apps to Meta Quest and Horizon OS — input adaptation, panel layout, and design requirements. Use when adapting a mobile…
Upgrades Meta Quest apps to newer Horizon OS SDK versions — migration guides, deprecated API replacements, changelog. Use when updating SDK versions or fixing…
Guides design of comfortable, intuitive VR/MR experiences for Meta Quest and Horizon OS — comfort guidelines, interaction patterns, spatial layout,…
Builds WebXR experiences for Meta Quest and Horizon OS using the Immersive Web SDK (IWSDK) — ECS architecture, Three.js integration, spatial UI. Use when…
Scaffolds new Meta Quest and Horizon OS projects with recommended settings for Unity, Unreal, Android/Spatial SDK, or WebXR. Use when creating a new Quest app…
Analyzes Meta Quest and Horizon OS VR performance using Perfetto traces — frame timing, CPU/GPU bottlenecks, render pass analysis. Use when profiling frame…