Interaction System #
The interaction system works via interfaces. You can trigger interactions in multiple ways:
- On Overlap
- On Event
- On Interact event instigated by the player
It switches player input instigated interactions based on the found interface type. You can add any interaction type easily to your liking.
Player input instigated interactions are done via a trace to check if the traced actor has implemented a Can Interact Interface.
The trace will only block on Interaction Channels. Every interactable has a “Can Interact Sphere,” which is a collision box with all channels ignored except the interaction one to block. This makes it easier to interact with smaller objects. Alternatively, you can use the default visibility trace.
Every actor that has the can interact interface will show the interact prompt when looking at the targeted actor.
Every interactable in radius will show a small white dot.