I’m making an interact system so my player can interact with multiple things throughout my game. (Its based on Doom 1.)
I mean it works fine, but I’m not any professional. So I rather hear your two cents.
I mean it works fine, but I’m not any professional. So I rather hear your two cents.
They all could be merged to a single ‘interact’ called by the player and each actors handles its own functionality
Here’s a system I wrote for Multiplayer. It can easily be adjusted for SinglePlayer. It’s a teaching series, not a copy cut and paste tutorial.
side note, this is the beginners version.
Advanced, pre-C++ translation version looks like this.
There’s a few ways to do this, as you can see.
You can also add actors to an array on the pawn on overlap and call BPI_Interact on the closest, and let the Actionable Object which implements the interface handle it.