How do you prefer to do interaction for in-game objects/ items?

Hello everyone, I have been wondering how you guys do interactions in your games?
I am not very happy with my current implementation and would love to hear about some different approaches.

For the current project I have a simple trace, and when player traces over a intractable object/ class.
A delegate notification fires and on screen message say e.g: “Pick up - Item name”.
If player presses the “Use” key (function overriden in derived classes) it will take the current HitResult and a action is preformed e.g: Pickup, Open and so 4th.

Now this works fine as long as a object only have one action, but take a door, you can Open, Lock/Unlock it.
And then you need two key binds or a clever interaction system.

Anyone have the time to share some ideas?


What I did is similar to yours, but it traces actor that implements an IntractableInterface, and these actors provides both information of interactions that can be done to them (for display purposes) and also handles the actual interactions themselves. The one who do the tracing is HUD who display the interaction information, and then the HUD set the actor as the CurrentlySelectedActor in game mode, GameMode will then activate the InputComponent of that actor so that it can listen to input. So the actor itself is independent, it knows what interaction can be done to it, and then process input and do the interaction.

Interesting, I was under the impression that interfaces was sort of, on the way out.
Going to do some test, any idea on how well the approach would fit multiplayer?