Skip to main content

Agent Inventory

Agents within your scene each have their own inventory system. This is used to carry items within the scene and is easy to setup.

Slot System

Each item must be carried within a slot and a slot only can take one type of item, these represent position items can go onto on an agent. When an item is picked up the Unity Rigidbody kinematic is turned off and it is positioned by the item handle point or it's origin point to the position of the slot. It is then made a child of the slot meaning it will move with any positions and rotating the slot has applied to it. On dropping the item it will be orphaned from the slot meaning any movement will not be applied and the Unity Rigidbody kinematic will be enabled meaning gravity will take affect. Slots can be added to agents by adding components to the model used for the agent, these can go directly on the bone game objects.

In Use

This means that the slot currently has an item in it.

Slot Types

This is powered via a collection held as a scriptable object. The default ones which come with the tool are; 'Dominant Hand Handle', 'Non-Dominant Hand Handle' and 'Storage'. These types can be used to filter the slot used for picking up items and how the item is positioned to the slot.

Relation to Points of Interest (POI) on Items

If a item has a point of interest which is the same slot type then where this POI is will be used to position the item in relation to the slot. With the hand storage it will default to the one it is but fall back on the other (i.e. if Non-Dominant Hand Handle is used but is not present and Dominant Hand Handle is then it will use the Dominant Hand Handle even though the request is the Non-Dominant Hand Handle).

Total

This is the amount of the same object the agent is carrying in this slot, when agents pick up items they will attempt to use the same slot if it is the same type of item.

Item Sizes

Items can come in a range of sizes, the default list is; small, medium, large and hidden. These are listed in size order (small being small, hidden being the biggest). Items will have to be the exact size unless you enable allow smaller.

Interacting With Slots

Every agent will have their own slot service which manages the relationships of these components under the hood of the ownership service. The ownership service also contains information about buildings, rooms and possible other items agents have access to but this can be filtered using the ownership flag.