actor placed in level, cant send rpc to server?

is this normal?

here is my blueprint on the actor placed in level:

http://i.imgur.com/MJb7CVY.png

and here is the result when the client pawn hit the actor placed in level, server never receive the rpc…:

http://i.imgur.com/vI4or14.png

and here is the result when the server pawn hit the actor placed in level, alors work fine:

http://i.imgur.com/ZGwK58A.png

its probably due to the actor placed in level isnt owned by a client

but how to do then easily? it seem to me that it was simple to code the effect on hit with a rpc multicast event inside the concerned actor… but client cant inform server that they hit it ? o_O

if someone know if i did something wrong, or how to do, i would need some help :slight_smile:

ty

You’re right it won’t work because of actor ownership.

More to the point though, why are you even trying to process this on the client? The server has the authoritative view of all actors, you should just put a SwitchHasAuthority node after the OnComponentHit and then on Authority, call the multicast event to notify the clients. There’s no need for every client to be testing for overlaps.

i do this because my client are simulating physics and are trusted by server for their location, what they touch, what they collect, etcc, physics is disabled on server side

client are trusted by server because its a coop game, we wont care about cheater, because cheating with a friend in a coop game is not needed, friends would be agreed on cheating or not ^^

but doing this, i am now stuck with this scenario where client bump into actor place in level, they cant communicate with server trhough this actor :frowning:

maybe there is a way to do a server authorative game with player controlling a physics object but i always failed in differents things, in some case the delay in input is too bad, some case desync happen, etc i couldnt do it, the delay ruin everything.

Okay, well in that case, presumably each client can only be responsible for the movement and collision of their own pawn. So whenever a collision occurs between a client’s pawn and an actor in the world, send the server an RPC on the pawn/player controller. These are owned by the client so will work.

Essentially, instead of an actor sending an RPC saying ‘client pawn collided with me’, the pawn/pc sends an RPC saying ‘I collided with actor X’.

yep, that should work, but i would have love to find a way to code this inside the actor blueprint himself

because i fear to have many many many custom event inside the pawn or player controller to manage all the things the player can interact with

but if there is no other way i will do like this :slight_smile:

ps: i found a SetOwner function, i tried to force to SetOwner of all the “bumper” actor in my level to be owned by the local player controller on begin play. But after some test, its not working. is that normal too? because it would fix my problem if it should work!!!

thx for your help guys :slight_smile:

SetOwner needs to be called on the server, only one client can own an actor at a given time. So there is no way to allow multiple clients to be able to send RPCs through the same actors.

Normally, there wouldn’t be the issue of sending so many interactions through the player controller, because the normal approach is just to send the player’s input, or direct results of their input, and let the server handle the actual interactions.

I am not saying that the way you want to do it is wrong, I don’t have the experience to know. But for sure, it does not really fit the standard client-server approach that the engine seems to be set up for.

ok thanks for the information :slight_smile:

I am having the same issue. I too want to keep the Events within a Actor Blueprint, it makes sense so this asset can be used within other projects. This seems like such a hassle to contain all Custom Events inside the Player Controller.