- Home /
Homing Missile update on client
Hello,
I am working on a mobile multiplayer game. I am currently working on a homing missile. I have two approachs for the homing missile.
1) After instantiating homing missile on "Client A", I can instantiate homing missile at the same position on "Client B". The problem in here that sometimes missiles may follow different paths because of the lag issues.
2) I can instantiate homing missile on "Client A", then update missile location on "Client B" every frame.
Which one do you think is the best approach?
Answer by misher · Aug 27, 2018 at 12:47 PM
The missile can fly differently on every client, you shouldn't sync it every frame for sure, maybe every second but not every frame (with maybe some smoothing for visual lag when update happens). There should be a single source of true, and it should be host machine. The only important event is when the missile actually hit something (or fuel over) then you can update all clients accordingly.
Thank you very much for the answer. I think this is the best approach. I should pass to the other client uniq ID for the each active ho$$anonymous$$g missile instances to prevent chaos. Anyway it is doable I guess. Thank you again.
Your answer
Follow this Question
Related Questions
How to detect specific gameObject on Client Side 1 Answer
UNET Client Cant Send Server Commands, Host Can. 1 Answer
Confusing in Multiplayer Networking uNet Client-Server 0 Answers
Order of Execution in Multiplayer 2 Answers
Rpc Can't be called on client - Problem with client, works on server 1 Answer