Technical Designer/Gameplay Programmer
Video summary of the Interaction System
The interaction system allows players to interact with any actors in the world.
System Summary: The interaction system allows designers to transform simple static meshes and other actors into interactive objects, that players can observe and use. Designers can completely control the result of an interaction, which can range from a comment from the main character, to a piece of machinery activating.
How it works - Action Triggers
Action triggers are Actors that are always connected to an Interactive Object (a.k.a. Object Behavior). They are in charge of detecting if the player can interact with the object or not, based on the player's position and camera orientation. Action Triggers have two key components:
A "Collision Area", that detects when the player enters the Action Trigger
A "Look At Area", that detects when the player is looking at the interactive object
Action triggers connect objects (static meshes, skeletal meshes, and others) to their behaviors.
Action triggers can connect different objects to the same behavior. This is useful when designers want to make several objects behave as one. In a room full of coffee mugs, designers might want the main character to treat the mugs as if they were a single entity. For instance, designers can tell the main character to make the comment "These mugs are ugly!" regardless of the mug that the player interacts with.
Whenever the FirstPersonCharacter enters the "Collision Area" of an action trigger, a raycast activates in the main character. If the raycast hits a "Look At Area", the game enables the Interactive Object connected to that area. The interactive object remains enabled until the player stops looking at the "Look At Area".
An enabled interactive object reacts to the players' using the left mouse button. When players press the left-mouse button, the system takes all of the enabled interactive objects in the level, and triggers their behavior.