- Home /
Network View trouble.
Hi everyone.
This is whats going on, I have a server-Client application.
I instantiate players in client and server, and i also instantiate a cube that is a target.
The thing is, if i shoot the cube with my player in the server app, it moves in the server screen, and it moves in the client too.
Butttttttt, if i shoot the target in the client, it only moves in the client screen, it does not show any changes in the server, i have no clue.
Any one can help me? please?
Regards.
Answer by syclamoth · Mar 13, 2012 at 12:35 AM
This is because the server is authoritative in this case. You need to set up some system where if the cube receives a hit on a client that is not it's owner, it sends an RPC call back to the owner containing all the relevant information to recreate that hit on the server. Then, when the server receives that RPC, it acts upon the cube the same way that it would had the server hit it, and that movement will get propagated to the client.
Oh ok ok, so i have to reproduce the changes in my server. Thanks.