The black box (has its own network transform)snipping up and down was supposed to follow the player with a fixed offset and works perfectly in the host side but it keeps snipping up and down in the client side even the black box was not supposed to be moving as the playing is not moving.
Is this the correct script? This script doesn’t have anything network related. It just sets its position to an offset of whatever the player position is, so if it is moving unexpectedly your problem is going to be on whatever object is assigned to the player variable.
Also, you’re not going to get many people downloading files from your google drive to help with a forum question.
Thx for the replay, I thought people can view the video online without downloading it , I will upload it on youtube later.
The player variable is assigned to the black box when it is spawned and I assigned a network transform component to the black box prefab to keep track of its movement
The following script are in the player manager script which is assigned to the player prefab
The missile movement script controlls the black box movement after it is fired so should not casue the problem as I havenot added the fire() method into the player controll yet.
Your Start in the player management script is going to try to call CmdSpawnMissile() on the host and every client individually. It is going to fail on most clients and give a warning regarding lack of authority to run the command, but you should still specify what machine you want to run that command from instead of running it on all machines.
So the black box is the missile? Where on the clients are you setting CameraFollow.player? You’ve only shown where you are setting that on the server. Are you getting null reference errors on the clients?
Yes the black box is the missile, there is no null reference error on the client, the black box are able to follow the player on the client side but there is still the problem of snipping up and down even when it is following the player and when the blakc box is not supposed to be moving