Introduction
This component is used as an extra for First person or player controlled modes to display an icon when an interactable object is within mining range which is set on the Input Manager.
Setting up
There are two prefabs – InteractionIndicator_PlayerControlled and InteractionIndicator_FirstPerson in /prefabs/UI.
In both instances this component should be added as a child to the TopDownPlayerController or the FirstPersonController.
For the TopDownPlayerController its important to have a UIBillboard component so the Icon in world space is always pointing at the Camera. Continuous should be enabled in the UIBillboardManager.
Settings
Mode
How the interaction should be displayed and in what game type.
Player Controlled – Displays the indicator in world space above the players head. The Canvas component should be World Space.
First Person – Displays the indicator in overlay – screen space in the middle. The Canvas component should be in Screen Space – Overlay.
Interactable Mask
Assign the layer that all the interactable objects belong to. Assign them all to something like ‘Interactable’ to save overhead.
Icon To Pos
Where should the Icon move towards when an interactable object is within range?
Indicator
Assign the indicator to move.
Appear Duration
How long should it take for the indicator to appear.
Disappear Duration
How long should it take for the indicator to disappear.