Simple First Person Interaction

This plugin provides events that helps you focus and interact with items and interact with items in first-person games.

Category:
Tags: , , , , ,

Description

Overview video

Demo Project Video

In first-person games, you usually interact with the world. You pick stuff up, you press buttons, and so on.

This plugin introduces a simple component to make this happen by using linecasts to look for items that can be interacted with.

You can then implement logic on items or on your pawn by using the following events:

* OnFocusStart

* OnFocusEnd

* OnInteract.

What problem does it solve?

It’s a simple way to get first person interactions going with events without having to implement your own.

How does it work?

To set it up, you do this:

The SimpleFirstPersonInteraction component will look for the objects and when you come close enough, it will trigger the following events in the items that implement the interface:

* OnFocusStart: When you are close enough and look at the object

* OnFocusEnd: When you are too far away from the object or stop looking at it

* OnInteract: If you interact with the object, this is triggered manually from the pawn, e.g. by clicking LMB

Technical Details

Code Modules:

Number of Blueprints: 0

Number of C++ Classes: 2 (SimpleFirstPersonInteractionComponent.h, InteractableItemInterface.h)

Network Replicated: No

Supported Development Platforms: Windows 64-bit

Supported Target Build Platforms: Windows 64-bit

Documentation: https://niflheim-games.gitbook.io/simple-first-person-interaction-docs/

Example Project (5.1): Here

Playable Demo: Here

Supported Engine Versions

5.1 – 5.2