Weird warping/teleporting bug when InstantiateSceneObject

Options
Hello,

I am experiencing a weird problem where when i try to spawn scene objects from clients (with rpc) to the master client the object goes to 0,0,0 then warps to the proper location. This happens only on the clients, the master client works properly.

What i am guessing is that the first packet sometimes gets lost?!
The network view for the spawned objects is with fixed owner, and observe is set to unreliable on change.

This issue does not occur when im spawning the initial player character only when spawning subsequent entities (projectiles in my case).
Any help will be appreciated.
[RPC]
void FireProjectile(string projectilePrefabName, Vector3 spawnPosition, Vector3 launchTo, Vector3 hitNormal){
		if(PhotonNetwork.isMasterClient == false)
		{
			return;
		}
		GameObject projectile = PhotonNetwork.InstantiateSceneObject("Prefabs/Spells/"+projectilePrefabName, spawnPosition, Quaternion.identity, 0, null);
}

This is the spawn code on the master client. The spawn position is properly set, but after the first frame some clients decide to put it to 0,0,0 and after the next update put it to the proper place.

Comments

  • vadim
    Options
    How do you synchronize projectile positions after instantiation?
    What happens if you disable this synchronization?