Replication of spawning actors

Really depends on your project. What I do in mine might not mesh well with yours.

I’m doing open world looter shooter. To loot items, open/close doors, work with elevators, enter vehicles etc I have a single input event that executes interact logic.

The client does a trace. If the hit returns a result it checks if that actor is interactable. If so it RPC’s the server to Interact. Server executes the same exact code. I use a branch to allow it to further step through logic. If the actor is interactable, determine its type (Gameplay Tag C++ implementation), then execute either a BP Interface call on the actor (Doors, lifts, elevators) or an actor component function (Enter vehicle, pickup item etc).

This maintains server authority in the game world and reduces code bloat.

1 Like