Hi ! ![]()
I’m working on a P2P multiplayer project and I encountered something that I’m unable to solve. I’ve been looking on the internet for an answer but couldn’t find a suitable solution to my problem (which may be somewhere, I hope).
In my game there’s a mechanic where players can hide into objects, players are not supposed to be able to enter an object who already contains another player. There’s in fact two issues that I can’t solve but I believe it all ties down to the same thing in the end.
I have one object class which contains all the code and then a child actor. First, when I enter the parent object on the server side it works but the other player can also enter the object.
Second, when I interact with the Child Actor, I can enter and leave but only once as the object will then always return a “False” value when I check for “IsEmpty?” when the raycast hits the object, note that this happens both on server side and client side.
First, the player makes an input to fire a raycast to check if the object is one inside you can hide :
Here are the two different events fired when their conditions are met :
It’s important to note that events which contains “RPC_SERVER_XXXX” are replicated with the option “Run on server” and the “RPC_PLAYER_XXXX” are replicated with the “Multicast” option.
And finally here’s what happens inside the object you can hide into :
Am I missing something about Replication ? Am I doing Replication the wrong way ? Is it something else ? ![]()
If you need more infos about the setup, feel free to ask, I’m really stuck and will give you any info you may require to find a solution. You’ll find all the codes involved in my problem on this post.
Thanks in advance ! ![]()



