You can interact with two kind of objects :
- Interactables : Objects like chests, doors, ...
- Targets : Actors which have a TargetComponent
Important :
You need to set the "enemy" tag inside the TargetComponent of the enemies. Otherwise the player won't consider them as enemies and he won't attack them.
An outline effect is shown when you have the mouse cursor over such objects.
Note : Don't forget to add to M_Outline post process material to a post process volume inside the scene to show this effect !
The outline has different colors based on whether we are targetting a Interactable or an enemy :
To change the color of the outline effect you need to change the OutlineColor parameter inside the material collection : MC_OutlineParams. Check the BP_TopDownRPGPlayerController::ShowOutlinesOnActor() function to see an example.