Advanced Interact System Updated

What will be the objective.

For this documentation, I will be using the third person project template

If you have not followed the steps on the first page of the documentation, you must follow the steps to continue with the system configuration.

We will focus on making a light that turns on and off when we interact with the lamp, this lamp is included in the "StartContent" folder that you can include in your project, but it does not necessarily need to have this lamp, it can just be a light that will turn on and off, the focus is to understand this side of the interaction system.

Captura de tela 2025-01-22 163510.png


Adjusting the system in the player for simple interaction

In your player's blueprint, click on the component and you will see in the details panel, several variables that can be adjusted.

Captura de tela 2025-07-09 165145.png

I am leaving below a table showing what was changed and where it was changed to, I only changed what is in the table, what is not in the table, you can leave the same as it is.

Variable name What to adjust
Interact Mode Area Interact
Area Collision Type Sphere
Sphere Radius 120
Use Pre Interact Area?
If Pre Interact, What Distance from the Object to Allow Interaction? 80
Hidden Area In Game

Yes, just that.


Creating the Object for area interaction

I'm going to use a copy of the actor that's ready to be used to create the lamp that we're going to interact with.

Captura de tela 2025-06-18 163752.png

And I will name this copy "BP_LightAreaInteract”

Captura de tela 2025-06-18 163900.png

If you want to create an actor from scratch, don't forget to add the "CreateWidgetOnObject" event that comes from the component, in the begin play of the actor object.

I replaced the Mesh with the lamp and added a light point

Captura de tela 2025-06-18 164102.png

I did this logic in the image below, by default the boolean is true

Captura de tela 2025-06-18 164707.png

And I adjusted the object variables like this:

Captura de tela 2025-06-18 171657.png

Okay, now we have everything set up for basic interaction, drag your lamp into the world and test it out.

ezgif.com-crop.gif


Hold button to interact with Area Interact

To activate the Hold button to interact system, let's go back to the player.

Click on the component and look for the Hold button category. I adjusted mine in the same way as the image below:

Captura de tela 2025-06-18 203257.png

Now just test and see how everything is going.

ezgif.com-optimize.gif


How to use the Outline Highlight

To use the Outline, go to your map's global post process and search for "Material”

Captura de tela 2025-07-09 174218.png

Click to add a material

Captura de tela 2025-07-09 174402.png

Captura de tela 2025-07-09 174323.png

The material that will be added is the one in the image below:

Captura de tela 2025-07-09 175107.png

Captura de tela 2025-07-09 175130.png

Now you need to activate the system in the component that was placed in the player

Captura de tela 2025-07-09 175357.png

I set true to both booleans

Captura de tela 2025-07-09 175416.png

Now take the test

unknown_2025.07.09-17.57-ezgif.com-crop.gif

To change the outline behavior, open the material instance that was placed in the post process.

Captura de tela 2025-07-09 202305.png

Captura de tela 2025-07-09 202410.png

You can preview the changes without having to re-test. Drag a static mesh into the world, go to the details panel, search for "custom depth," and activate it, as shown in the image below:

Captura de tela 2025-07-09 202944.png

See that the line was shown in the object, now just make the changes to the material instance and see what the line will look like during the game.

Captura de tela 2025-07-09 203331.png

Now let's talk about widgets.


Understanding how widgets work

The Widgets are not very user-friendly, it is difficult to configure them, I am looking for a simpler and easier way to change things in the widgets.

I will show you where you will be able to change the images

Using Area Interact, the Widgets that are used for system mode are those in the image below, anything you want to change must be in these two Widgets

Captura de tela 2025-06-19 150833.png

If you want to change the icons that appear, you can change them inside the "WBP_ImageKeyAndPreInteract" widget.

Captura de tela 2025-06-19 151556.png

And if you want to change the hold button icon, you can change it in "WBP_HoldButtonUIProgress".

image.png