Logotipo de Hz Unity Placement

Hz Unity Placement

Organización
meta-quest
hz-unity-placement

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.

Add to TypingMind

Descripción general

Editormeta-quest
Repositorioagentic-tools
Nombre de la habilidadhz-unity-placement
Estrellas
195
Forks
17
Archivos incluidos
Solo instrucciones
LicenciaApache-2.0
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por meta-quest en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Hz Unity Placement en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/meta-quest/agentic-tools/tree/main/skills/hz-unity-placement
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/meta-quest/agentic-tools.git /tmp/agentic-tools
mkdir -p .claude/skills
cp -r /tmp/agentic-tools/skills/hz-unity-placement .claude/skills/hz-unity-placement
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Hz Unity Placement en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Hz Unity Placement automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Hz Unity Placement no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Unity Object Placement with Bounding Boxes

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.

When to use this skill

Use this skill automatically whenever:

  • Placing an object relative to another (on top of, beside, above, below, in front of, behind)
  • Moving objects to specific positions near other objects
  • Instantiating prefabs in relation to existing scene objects
  • Positioning imported models relative to scene objects
  • Any spatial relationship between GameObjects is specified

Automatic Triggers (invoke WITHOUT user asking)

IMPORTANT: Proactively invoke this skill immediately when you detect ANY of these patterns:

Placement Language Triggers

  • User says "place X on Y" or "put X on Y"
  • User says "place X next to Y" or "put X beside Y"
  • User says "place X to the left/right of Y"
  • User says "place X in front of/behind Y"
  • User says "place X above/below Y"
  • User says "position X near/around Y"
  • User says "arrange X on/around Y"
  • User requests "X meters/units to the left/right/front/back of Y"

Multi-Object Scenarios

  • Before ANY GameObject position modification involving multiple objects and spatial relationships
  • When importing models that will be positioned relative to existing objects
  • When arranging/organizing multiple objects in a scene
  • When setting up object hierarchies with spatial relationships

Distance-Based Placement

  • User specifies distances: "2 meters to the left", "0.5 units above", etc.
  • Combine specified distance with bounding box calculations
  • Example: "1 meter to the right" = refMax.x + 1.0 + targetExtents.x

Example Scenarios

Auto-Invoke Skill (Do These Immediately)

Example 1: "Place all objects on the tables"

  • Action: Invoke unity-placement skill immediately
  • Why: Multiple objects being placed relative to tables

Example 2: "Put the mug on the table"

  • Action: Invoke unity-placement skill
  • Why: Single object placement with "on" relationship

Example 3: "Place the lamp next to the clock"

  • Action: Invoke unity-placement skill
  • Why: "next to" indicates horizontal spatial relationship
  • Process: Get both bounds, place lamp beside clock using refMax.x + targetExtents.x

Example 4: "Position the book 0.5 meters to the left of the pen"

  • Action: Invoke unity-placement skill
  • Why: Distance-based placement with spatial relationship
  • Process: Get bounds, calculate: penMin.x - 0.5 - bookExtents.x

Don't Invoke Skill (Direct Operations)

Example 1: "Move object to [5, 10, 3]"

  • Why: Direct coordinates provided, no relative positioning

Example 2: "Set the cube's position to (0, 0, 0)"

  • Why: Absolute position, no reference object

Core principle

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.

Instructions

Step 1: Identify the objects involved

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.)

Step 2: Get bounding box information

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:

PropertySpaceAccounts for rotation?Use when
Renderer.boundsWorldYes (AABB enclosing rotated mesh)Placing objects in the scene — preferred for placement
Renderer.localBoundsLocalNo (ignores rotation)Comparing intrinsic object sizes without rotation effects
Collider.boundsWorldYes (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.

Step 3: Use world bounds directly (or convert from local)

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:

  • worldCenter: [x, y, z]
  • size: [width, height, depth]
  • extents: [width/2, height/2, depth/2]

Step 4: Calculate placement position

Based on the spatial relationship, calculate the target position:

On top of (object A on top of object B):

targetY = B.worldMax.y + A.extents.y
targetX = B.worldCenter.x
targetZ = B.worldCenter.z
newPosition = [targetX, targetY, targetZ]

Beside (object A beside object B, +X direction):

targetX = B.worldMax.x + A.extents.x
targetY = B.worldCenter.y
targetZ = B.worldCenter.z
newPosition = [targetX, targetY, targetZ]

In front of (object A in front of object B, +Z direction):

targetX = B.worldCenter.x
targetY = B.worldCenter.y
targetZ = B.worldMax.z + A.extents.z
newPosition = [targetX, targetY, targetZ]

Above (floating above, with gap):

gap = 0.5  // or specified distance
targetY = B.worldMax.y + gap + A.extents.y
targetX = B.worldCenter.x
targetZ = B.worldCenter.z
newPosition = [targetX, targetY, targetZ]

Next to / Beside with distance (object A next to object B, with specified gap):

gap = user_specified_distance  // e.g., 0.5 meters
// Right side (+X):
targetX = B.worldMax.x + gap + A.extents.x
// Left side (-X):
targetX = B.worldMin.x - gap - A.extents.x
targetY = B.worldCenter.y  // or B.worldMin.y + A.extents.y for ground level
targetZ = B.worldCenter.z
newPosition = [targetX, targetY, targetZ]

X meters/units to the left/right/front/back:

// "2 meters to the right of B"
targetX = B.worldMax.x + 2.0 + A.extents.x

// "1.5 units to the left of B"
targetX = B.worldMin.x - 1.5 - A.extents.x

// "0.5 meters in front of B"
targetZ = B.worldMax.z + 0.5 + A.extents.z

// "1 unit behind B"
targetZ = B.worldMin.z - 1.0 - A.extents.z

Step 5: Apply the position

Use available Unity MCP tools to set the target object's position to the calculated coordinates.

Step 6: Verify placement

After placement, inform the user:

  • The calculated position
  • The bounds that were used
  • Any adjustments made
  • Suggest they check the Scene view

Common placement patterns

On top (stacking)

  • Use reference object's top surface (worldMax.y)
  • Add target object's half-height (extents.y)
  • Align centers horizontally (X, Z match)

Beside (horizontal adjacency)

  • Use reference object's side surface (worldMax.x or worldMin.x)
  • Add target object's half-width (extents.x)
  • Align centers vertically (Y matches) and depth-wise (Z matches)

In front / Behind

  • Use reference object's front/back surface (worldMax.z or worldMin.z)
  • Add target object's half-depth (extents.z)
  • Align centers (X, Y match)

At specific offset

  • Start with reference object's center
  • Add custom offset
  • Still account for target object's extents to ensure proper grounding

Best practices

  1. Always get fresh bounds: Don't cache bounds - always retrieve before placement
  2. Account for scale: World-space bounds already include object scale
  3. Account for rotation: World-space bounds (Renderer.bounds) are axis-aligned bounding boxes (AABB) that expand to enclose the rotated mesh. A 1x0.1x1 plane rotated 45 degrees on Z will have a taller AABB than when flat. This is correct behavior — the AABB reflects the actual space the object occupies. Always use world-space bounds for placement so rotation is automatically handled
  4. Handle missing renderers: If no Renderer, check for Colliders; if neither, warn the user
  5. Explain calculations: Show your work - tell the user what bounds were found and how position was calculated
  6. Local vs world positions: MCP tools may accept local or world positions - calculate accordingly and be aware of parent transforms. When an object has a parent, its position is in parent-local space
  7. Handle prefabs: When instantiating prefabs, get their bounds after instantiation

Handling edge cases

Object has no Renderer or Collider

  • Warn the user that bounds cannot be determined
  • Suggest adding a Collider or ask for manual dimensions
  • Fall back to assuming zero size at object's pivot

Multiple Renderers (parent with children)

  • Use the parent's Renderer if available
  • If parent has no Renderer, calculate combined bounds from children
  • Note this to the user

Rotated objects

  • World-space bounds (Renderer.bounds) are axis-aligned bounding boxes (AABB) that expand to enclose the rotated geometry
  • A rotated object's AABB is typically larger than the object's visual silhouette, which may create visible gaps when placing objects flush against it
  • This is expected — warn the user if the gap looks undesirable and suggest adjusting rotation or using a manual offset
  • If the user needs tight placement against a rotated surface, consider using the object's local forward/up/right vectors with localBounds to compute a surface point, rather than relying on the AABB

Irregular shapes

  • Bounds are axis-aligned boxes (AABB) — they represent the smallest box aligned to world axes that fully contains the mesh
  • They may be significantly larger than the visible mesh for non-box shapes (e.g., a diagonal beam, a sphere's AABB has empty corners)
  • Note this to the user when placement gaps appear

Very small or very large objects

  • Verify bounds seem reasonable (size > 0)
  • Warn if extents are extremely small (< 0.01) or large (> 100)

Example workflow

User: "Place the Cube on top of the Sphere"

  1. Get Sphere's components and extract bounds:

    • Size: [2, 2, 2], Position: [0, 1, 0]
    • World center: [0, 1, 0], Extents: [1, 1, 1]
    • World max Y: 2
  2. Get Cube's components and extract bounds:

    • Size: [1, 1, 1], Current position: [5, 0, 0]
    • Extents: [0.5, 0.5, 0.5]
  3. Calculate new position:

    • Target Y: 2 (Sphere top) + 0.5 (Cube half-height) = 2.5
    • Target X: 0 (Sphere center X)
    • Target Z: 0 (Sphere center Z)
    • New position: [0, 2.5, 0]
  4. Apply position to Cube

  5. Report: "Placed Cube on top of Sphere at position [0, 2.5, 0]. The Cube (size 1x1x1) sits on the Sphere's top surface (Y=2)."

Quick reference

Coordinate axes in Unity

  • X: Right (+) / Left (-)
  • Y: Up (+) / Down (-)
  • Z: Forward (+) / Back (-)

Common bounds properties

World-space (Renderer.bounds, Collider.bounds) — use for placement:

  • bounds.center: World-space center of the AABB
  • bounds.size: Full AABB dimensions (accounts for rotation and scale)
  • bounds.extents: Half dimensions (size / 2)
  • bounds.min: World-space minimum corner
  • bounds.max: World-space maximum corner

Local-space (Renderer.localBounds) — use for intrinsic size comparison:

  • localBounds.center: Local offset from object pivot
  • localBounds.size: Intrinsic dimensions (ignores rotation)
  • localBounds.extents: Half dimensions (size / 2)

Placement formulas

  • On top: refMax.y + targetExtents.y
  • Below: refMin.y - targetExtents.y
  • Right of: refMax.x + targetExtents.x
  • Left of: refMin.x - targetExtents.x
  • In front: refMax.z + targetExtents.z
  • Behind: refMin.z - targetExtents.z

Distance-based placement formulas

  • X units to the right: refMax.x + distance + targetExtents.x
  • X units to the left: refMin.x - distance - targetExtents.x
  • X units in front: refMax.z + distance + targetExtents.z
  • X units behind: refMin.z - distance - targetExtents.z
  • X units above: refMax.y + distance + targetExtents.y
  • X units below: refMin.y - distance - targetExtents.y
  • Next to with gap: refMax.x + gap + targetExtents.x (or use refMin.x for left side)

Remember

The goal is to make object placement intuitive and accurate. Always:

  1. Get actual bounds from components using available Unity MCP tools
  2. Calculate world-space positions
  3. Account for object extents (half-sizes)
  4. Explain your calculations to the user
  5. Never guess object sizes
  6. Never place objects at arbitrary positions without bounds

Preguntas frecuentes

¿Qué hace la habilidad de IA Hz Unity Placement?

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.

¿Por qué usar Hz Unity Placement en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Hz Unity Placement está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Hz Unity Placement en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/meta-quest/agentic-tools/tree/main/skills/hz-unity-placement. TypingMind lee el archivo SKILL.md de esa carpeta e instala su contenido como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Hz Unity Placement?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Hz Unity Placement?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Hz Unity Placement con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Hz Unity Placement?

Sí. meta-quest la ha publicado en GitHub bajo la licencia Apache-2.0. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇