I’m trying to implement a system where if you hit another player with a projectile, that player gets knocked back. I realized I have to use a RPC call to knock back another player. I can get the ViewID for the other player from collision.gameObject.networkView.ViewID
, but I need a NetworkPlayer to perform an RPC call. Is there any way to get a NetworkPlayer from a ViewID?
If i remember correctly:
networkView.owner.
Problem is that all networkplayers are the same on the client side except for the server.
You will have to ask the server: please forward my message to the client owning networkview X.
only the server knows all clients.
what you can do is assign playerIds for each networkview, and keep track of players in a list that is kept the same on client and server side.
Can someone clarify this? Might be all rubbish…