# Asset Types & Collisions

{% hint style="info" %}
**Entities** are a type of Asset used by creators to build Experiences, but they can also be passes for gated Experiences used by players.

**Equipment** is a special class of Asset which players can apply to their Avatars during gameplay. Equipment may either be an NFT players purchased on the Marketplace or an object collected during gameplay that is the property of the Experience creator.

**Blocks** are a type of asset that can not be minted as NFTs.
{% endhint %}

## About Colliders

{% tabs %}
{% tab title="About Colliders" %}

## Colliders

A collider (or bounding box) is the three-dimensional boundary of an asset that will have physical interactions with other assets in the Game and players.

The game engine uses colliders to calculate if a player will bump into a wall or pass through an opening in it, and it can also make a rounded object (such as a ball) roll if it has collisions+gravity applied and something collides with it.

The collider is defined by the extreme points of the model(s) and creates a mesh that is like an invisible box around the whole asset.

{% hint style="info" %}
The closer the colliders, or bounding boxes, are to the visible voxel shapes inside, the more natural they will feel when interacting with them in the game.
{% endhint %}

<div><figure><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/hfkG4dnqimP2x073aKUD/image.png" alt=""><figcaption></figcaption></figure> <figure><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/ZI4BVxWO4gSkjuShyKYp/image%20(4).png" alt=""><figcaption></figcaption></figure></div>

{% hint style="warning" %}
It is always important to trim the colliders on all of your models for more natural collisions in the game engine.
{% endhint %}
{% endtab %}

{% tab title="Trim Volumes" %}

### Trim Volumes

#### A Simple Step for Better Feel in Game

Once you are satisfied with the shape of your asset's models, make sure that you trim the bounding box for each one so the collisions are as small as possible in the game world.

### Trim a Model in the Modeler

Pressing the Trim Volume button automatically shrinks the model's collision box to the smallest fit, removing empty space.

<figure><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/FI7T0h6E3gI4J9Z6u0pE/image.png" alt=""><figcaption></figcaption></figure>

### Trim Each Model in the Animator in One Click

If you are creating a compound or animated entity with more than one model, follow this quick workflow to trim the volume of every model at the same time.

1. In the Viewport, left click and draw a selection box around the entire asset.
2. In the Library Panel, all models will be selected. This is indicated by a green outline around every model's thumbnail. Click on the trim volume button in the Library tools.

<figure><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/9592JKwDi3RgZJn4DiUc/trim%20all%20tool.png" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If the asset has a high amount of models it may take a moment to trim all of them.
{% endhint %}
{% endtab %}
{% endtabs %}

## **Simple Static Assets**

{% tabs %}
{% tab title="Simple" %}
A simple asset is created in the [modeler](https://docs.sandbox.game/en/creator/voxedit/docs/modeler "mention"). It is made of a single model as a VXM file, and the collider is the volume box itself. It can be simple or complex, large or small, and is generally used for furniture, tools, weapons, etc.

VXM files can be used in compound or animated assets by importing them into the [animator](https://docs.sandbox.game/en/creator/voxedit/docs/animator "mention") library.

<div><figure><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/k0ItH8V6xwLvbmIPG3cd/image.png" alt=""><figcaption></figcaption></figure> <figure><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/l71xvNCVaS1MYqpSRfIM/image.png" alt=""><figcaption></figcaption></figure> <figure><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/Oy2YqyHMNphOr3mgBgjl/image.png" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
**TRIM VOLUMES**

Trim volumes for every model for better performance and more natural gameplay.
{% endhint %}
{% endtab %}

{% tab title="Collisions" %}

### Creating Natural Collisions

A separate collider won't automatically be created if the asset is curved or if it has unconnected parts. See the examples below for recommendations to make collisions feel more natural to players. In both cases, the invisible collider acts as a solid wall.

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Problem:</strong><br>Players can't walk in the visibly empty space under the traffic light</td><td><strong>Solution:</strong><br>Create a compound asset in the Animator, which joins smaller separate models with their own colliders into a single asset</td><td><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/xiygWgh5EJQpRnfes270/image.png" alt=""><br><strong>Traffic Light</strong></td></tr><tr><td><strong>Problem:</strong><br>Players can't walk in the gap between the two visible objects in the asset</td><td><strong>Solution:</strong><br>Create two separate simple entities in the Modeler with tightly trimmed volumes, upload each to your Workspace, and place in Game Maker</td><td><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/O82WTz2kpPC1eLzArY80/image%20(5).png" alt="" data-size="original"><br><strong>Vase and Bench</strong></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

## **Compound Static Assets**

{% tabs %}
{% tab title="Compound" %}
Compound static assets are created in the [animator](https://docs.sandbox.game/en/creator/voxedit/docs/animator "mention"). They are made of two or more models rigged together in a skeleton of multiple nodes.&#x20;

Each model in a compound static asset has its own collider volume, rather than a single collider around the whole asset.

{% hint style="success" %}
See [build-a-rig](https://docs.sandbox.game/en/creator/voxedit/docs/animator/build-a-rig "mention") to learn about building a rig in the Skeleton Panel.
{% endhint %}

### Benefits

* A compound static asset has colliders around each model in the asset for a more natural collision where no voxels exist, including access inside of buildings and passthroughs such as doorways (doors are added separately in Game Maker)
* Placing models at any desired angle to create smooth diagonal lines and blocky curves, resulting in a more efficient asset with fewer faces for the game engine to calculate

<figure><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/ZmJ3EzgWMQIalzhyM9ow/image.png" alt="" width="291"><figcaption><p>Building facade with passthrough doorway</p></figcaption></figure>

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FEeCNtMN2UpMvKlAWX0fg%2FVE%20compound%20entity%20rig%20opt.webp?alt=media&#x26;token=b1d082b8-8c76-45ca-8d34-480a1c30321c" alt=""><figcaption><p>Bookshelf with decorative models linked to nodes that are positioned and rotated freely</p></figcaption></figure>
{% endtab %}

{% tab title="Collisions" %}

### Creating Natural Collisions

Some simple assets, which have one collider around the whole asset, don't have natural feeling collisions if there are visibly open spaces that players can't pass through.&#x20;

In some cases, it's best to break down a simple model and reassemble it into a compound asset. This way, you can make a visibly identical asset that is much more realistic in the game world.

{% hint style="success" %}
Visit [break-down-objects](https://docs.sandbox.game/en/creator/voxedit/creative-guides/art-techniques/3d-design/break-down-objects "mention") in [art-techniques](https://docs.sandbox.game/en/creator/voxedit/creative-guides/art-techniques "mention") for a workflow to turn a simple entity into a rig that can be used for a compound or animated entity.
{% endhint %}

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Problem:</strong><br>The asset is a simple entity with one collider, making the open space unnatural.</td><td><p></p><p><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/qwDXePijlTxW2ythSxWB/image.png" alt=" Simple Entity" data-size="original"></p></td></tr><tr><td><strong>Solution:</strong><br>The asset is a compound entity with colliders around each model. Players can stand directly on visible surfaces.</td><td><p></p><p><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/bdTTptmVqz61IRSIzdiV/image.png" alt=" Compound Entity" data-size="original"></p></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

## Animated Assets

{% tabs %}
{% tab title="Animated" %}
Animated assets are built in the [animator](https://docs.sandbox.game/en/creator/voxedit/docs/animator "mention"). To create an animated asset, it's best to first commit to the shape of its models and the structure of the rig in the Skeleton Panel. Test poses with animation states to make final adjustments to the rig and models before adding motion.

When you are committed to your rig and models, you'll being adding motion to your animation states. You can use your posed animation states or create new animation states.&#x20;

When you add or duplicate an animation state, the new animation state will have the nodes of the rig positioned based on which animation state was previously selected and displayed in the Viewport. This may be used to your advantage to create certain types of animations in an efficient sequence (e.g., chest closed, chest opening, chest open, chest closing).

{% hint style="success" %}
See [build-a-rig](https://docs.sandbox.game/en/creator/voxedit/docs/animator/build-a-rig "mention") to learn about creating a rig in the Skeleton Panel.
{% endhint %}

You can create multiple animations to pose as needed before adding any motion keyframes, which will help you make any final changes to the shape of the models and the skeleton.

For each animation, add motion keyframes for every node and close all keyframes.
{% endtab %}

{% tab title="Collisions" %}

### **Animated Entities Have One Collider**

The colliders on each node's model do NOT move when the nodes move in an animation.

{% hint style="warning" %}
**DEFAULT COLLISION BOUNDARY**

An animated entity has **one collision box**, which applies to **all of the entity's animation states**. The outer extremes of the nodes in the default animation's first keyframe determine the collision boundary.

* To set an animation state to be the default, click the <img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/DjaZXz8xLg1yZddNN6Y6/image.png" alt="" data-size="line"> button next to an animation state name and click "Set as Default." The name text will turn blue.
* Turn off a node's collision if needed with the Node Collider Toggle.
  {% endhint %}

**Example:**

For the asset below, the default animation's first keyframe creates the collision box that will apply to every animation state.

<figure><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/8eJVZvDBqdeA72nlD533/image.png" alt=""><figcaption><p>The extremes for each model in the first keyframe creates a long, thin rectangle.</p></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/NRXkcbBKYUSBGH5OjRMb/animated%20entity%20collisions.gif" alt=""><figcaption><p>In the game engine, the asset displays whatever animation you set, but uses the default collider box.</p></figcaption></figure>

### Node Collider Toggle

**Reduce Node Count**

If part of your asset does not need collision and would be easier to build as a single model instead of many models rigged together, create the model and toggle off the collision for its node.

**Influence the Default Collider**

If the collider generated from your asset's default animation feels unnatural, you can toggle collision off for a node that is making the collider too large. Test different versions of your asset using this tool, carefully colliding with every animation to decide what feels best.

Method

Select a node in the Viewport or Skeleton Panel, open the Inspector panel, and click on the checkbox next to "Collides." If the checkmark is blue, collision is on. Otherwise, it will be turned off. Upload to Workspace and test in Game Maker.

**Example:**

The orange and blue squares in the asset below are simple models with their node colliders toggled off.

<div><figure><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/KHUWxUfAx2LTxjGujN2E/image.png" alt=""><figcaption><p>Click the blue "Collides" checkbox in the Inspector Panel to toggle off the node collider</p></figcaption></figure> <figure><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/LeiK1g0w039lsgW7sFRP/node%20collider%20toggle.gif" alt=""><figcaption><p>Test in Game Maker</p></figcaption></figure></div>
{% endtab %}
{% endtabs %}

## Equipment Assets

### Static or Animated

Equipment is a special asset class that generates collisions only around the unlocked nodes in the equipment template. Equipment can be static or animated, and it can only have one animation, or arrangement of it models (whether there is motion or not).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sandbox.game/en/creator/voxedit/docs/ve-guidelines/asset-types-and-collisions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
