The inventory and item system allows for multiple items to be equipped at the same time. As each item is equipped they will occupy a slot within the inventory. Because there isn’t a limit to the number of slots that a single character can have there isn’t a limit to the number of items that can be equipped at the same time. In most cases the most number of items that a character will have equipped at any one time is two so this page will setup that scenario.
For this example we are going to setup a Sword and Shield that you can dual wield. The initial item setup is the same as a single-wield item. Both items should first be created with the Item Manager. The Sword should specify a Slot ID of 0 (for the right hand) within the Item component, and the shield should specify a Slot ID of 1 (for the left hand).
Once both items have been created a new Item Set can be created that uses both items:
When the Item Set is active the Equip Unequip ability will try to equip the Sword in Slot 0 and the Shield in Slot 1. In most cases this is all that you need to do, however for the first person perspective you have some additional options based on which parent Object you are using.
For the first person perspective all of your items can share the Object within the First Person Perspective Item component. If however your item can be equipped with other items it is useful to have the item use its own object so each hand can operate independently. This was the approach that we took for the Sword Shield setup. If you look at the First Person Objects hierarchy you’ll see that the Shield is parented to just the Left Arms:
When the Shield is equipped the NolanFirstPersonLeftArms object will activate and be controlled by the shield’s First Person Perspective Item component. This allows the right arms to operate independently.