Before migrating the system to your project, we need to adjust some settings.
Let's create the collision type that the Interact system uses.
Click Edit, and then go to your Project settings
Go to the "Engine" category and look for "Collision", and then click on Collision
Create a new trace by pressing the button marked in the image below, and name it: "InteractSystem"
And by default set to "Block" as in the image below:
And now, let's adjust how some collision presets will react with this trace that was created.
On the same page, click on "Preset" This will open a menu with all the unreal engine collision types.
For now, I'm only going to set up one of these collision presets, which will be "Trigger".
Double-click on the collision type. This will open a window where you can define the response to the trace types. Set the Trace we just created to "Ignore".
Please repeat this same process for the "Pawn" Preset and set it to "Ignore”
Since the "InteractSystem" trace was selected as "Block" by default, you can come here in this same window and configure each type of collision independently, as we just did.
Okay, now let's migrate the system to the project
After you create the project, open the project that was created, so you can see the Demo Map and the Interact system files.
Click on the system folder (Advanced Interact System)
You will see the following folders:
Right-click the InteractSystemAssets folder, and click "Migrate”.
After clicking on "Migrate", this window below will appear, do not change anything, just click on "Ok”
After pressing "Ok", your computer's folder browser will appear, look for your project folder, and choose the "Content" folder of your project as the destination, wait for the files to be migrated and after that, you can close the InteractSystem project, and open your project.
And now, let's understand and configure the basics.
For this documentation, I will be using the third person project template
Let's get this system working, look for these components in the image below, they are responsible for the entire system working.
The name of the components already gives a hint of where they should be used, one is intended for the player and the other for the Actor, which I call Object
Let's focus on the component that goes to the player, as the object already has one ready to be used.
Open your character blueprint, or the player controller you are using, click on add Components and add the player component
That's all for now, I will explain more details in the sections dedicated to the system you choose.
I've already left an actor ready to be used, it's already all set up, all that's left is for you to adjust and use your world.
And this is the configuration needed to make any actor interactive.
If you want to create your own actor, don't forget to add the event that creates the widget to begin play
Now that we're done with the components, let's do one more step before diving into the details.
I will be using Enhanced input in this documentation, I recommend you use Enhanced input for this system works well.
Since I'm using the third person template, I'll follow the existing folder pattern to create the input.
Find the ThirdPerson folder, or the folder where your inputs are.
Click on the input folder
Click on the actions folder
In this folder we will create the input to interact.
Right-click on an empty area within the actions folder, this will open a menu with several options.
Find and click on the INPUT option.
You will see a drop down menu, within that drop down menu click on INPUT ACTION