I currently have battleships in my game that have turrets that shoot 3 bullets each. The bullet prefab has a network view component, and a networkrigidbody script that Interpolation and extrapolation.
The problem is that the bullets position and impacts are not consistant with all the players in the game. I also often get the errors like the following and the bullets fail to render with the other players.
Received state update for view id' AllocatedID: 260' but the NetworkView doesn't exist
View ID allocated ID:260 not found during lookup. Strange behaviour may occur.
I'm basing this off of the Multiplayer tutorial written by Andrius Kuznecovas. I'm not exactly sure what networking components are required for the rocket in the tutorial.
Thanks in advance.
nobody know how to result this problem... im waiting too for it :)
All you need to network any object is a networkView attached to the object. If you used Network.Instantiate then the id will be assigned for you and the owner of the object AKA the person who will control everything about the object is assigned based on who called Network.Instantiate.
Now what you are probably running into here is that you are letting other network players think they have control over the update of the object which is bad for many different reasons. Only the spawner of the object should have control of the object and decide whether the rocket has hit anyone or not. If you have every client doing hit detection on the object you may have someone that lagged or something decide the rocket hit him and destroy the object, meanwhile everyone else thinks the rocket is still in the scene and the owner is still sending updates to the other people which will cause a problem when the guy who destroyed it receives these updates with no rocket in the scene.
What I would suggest is sending an RPC to the server to create the object server side and let it determine who it hits and what position it is in. That way the server is making all the decisions and can update everyone else when things happen and all players have to agree with that decision.