-
Notifications
You must be signed in to change notification settings - Fork 0
Inventory
The inventory system consists of:
- InventroySystem
- InventoryUI
- InventorySlot
Every tool has two models. One for a depiction in the world and one for the hand. The hand model needs to be on a other rendering layer so it does not glitch into walls. Therefore a second camera is needed that only renders the hand models and afterwards adds its image ontop of the default camera. To set the render layer of a tool model simply change its layer to the FPS Layer.
The equipment of a item is triggered by the player controll script. It detects the number input 1-3. Then is triggers the EquipTool which gets the item from the inventory system and tells the player hand script to equip this item. The player hand script simply instantiates the handprefab of the tool and sets is as a child of the hand component.