Unreal Engine – Interact And Possession System UE4

Interact And Possession System is a series of Actor Components that you can add to other actors in your game to allow for a relatively quick and easy method to interact with objects, get info on what types of interactions you might be making, and possess other pawns. The system gives you a variety of options such as having multiple parts of an actor able to be interacted with to entered, and also providing you multiple locations to exit it from with various rules controlling how these relate to each other.

This type of setup can allow you to set up other interact responses like opening the trunk if a player interacts with the rear of the car and you can provide feedback through the Look At Info system so that whenever a player is in a situation to interact with part of an actor they can receive information on what type of interaction they can make (most likely you’ll want to plug the returns of this system into your User Interface). This project was made to be useful for newer developers, but also capable enough to help you keep saving time in the long run.

This system can be used to possess vehicles, turrets, bathroom stalls, hide in cardboard boxes, or just about anything else that involves shifting control from one actor to another. The interaction system is by default set up to be used by performing traces from your character towards what you are looking at, but is open ended enough that if you are using a different approach you can still make the rest of this system work in most cases. This system is also replicated and supports multiplayer games.

技术细节

Features:

  • An Actor Component and a Blueprint Interface for sending Interaction and Look At Info notifications between actors.
  • A Possession component that can handle letting an actor be entered or exited (such as getting into a tank or helicopter or porta potty). Supports multiple areas for entering or exiting an actor, and can limit exiting require an available space to leave.
  • A Look At Info system that lets you set up various types of information to be given to other actors on request, such as telling them what type of interaction they will be making should they interact with a given object/surface/component.
  • A Camera Controller (an Actor Component) that allows a player to look around using a camera on any actor.
  • A series of demonstration actors set up to help you understand and learn how to make proper use of these provided components and Blueprint interface.