Implementing a door system
In this section, you’ll repeat some of the previously explained topics about RPCs but with a small tweak – you’ll be developing some Actor-to-Actor communication over the network. What’s more, it will be between a C++ class – your character – and a Blueprint Class, a door that should be opened.
To accomplish this behavior, you will use a feature that you previously created in Chapter 4, Setting Up Your First Multiplayer Environment – the interact action. It may have slipped your mind with all the stuff you have developed so far, but fear not – it’s time to dust it off and put it to work once again.
Creating the Interactable interface
To create communication between your character and the door, you’ll use an interface. As you may already know, interfaces in C++ are a powerful tool for creating abstractions between different classes. They allow you to define a contract that all implementing...