Using Rigidbody.AddForce with UNet spawned prefab via Network.Spawn

Hi,
I’m sure this must have been asked previously…
I’m currently trying to apply force to a Rigidbody component of a prefab thats getting spawned via Network.Spawn however it doesnt appear to be working.

My Prefab has a Network Identity and Network Transform components. I have tried setting the Network Transform Sync mode to Sync Rigidbody 3D
and registerd the component via the NetworkManager SpawnInfo editor UI component

On my player I have a script which notifies the server to spawn my prefab if the player clicks the mouse button as per the code below.
Am I missing something?

TIA,

Lee

  void Update ()
  {
  CheckIsAttacking();
  }

  private void CheckIsAttacking()
  {
  if (!isLocalPlayer)
  return;

  if(Input.GetKeyUp(KeyCode.Mouse0))
  {

  SpawnPrefab();
  }
  }
  private void SpawnPrefab()
  {
  CmdSpawnPrefab();
  }


  [Command]
  private void CmdSpawnPrefab()
  {
  GameObject spawnObj = (GameObject)Instantiate(spawnPrefab, transform.TransformPoint(0, 0, 0.5f), Quaternion.identity);
  spawnObj.GetComponent<Rigidbody>().AddForce(transform.forward * 500f);
  NetworkServer.Spawn(spawnObj);
  }
Rigidbody shot = Instantiate(bulletPrefab.GetComponent<Rigidbody>(), barrelOut.position, barrelOut.rotation) as Rigidbody;
shot.velocity = barrelOut.forward * 250f;
NetworkServer.Spawn(shot.gameObject);

and add an NetworkTransform with 0 send rate… that all

physics forces are applied asynchronously in unity. In your code when NetworkServer.Spawn() is called, the object’s physics properties such as velocity have not been effected by the force yet.

To work around this you can spawn the object in a later frame, or set properties such as velocity directly.

How’s that?
What do you mean “in a later frame, or set properties such as velocity directly”?

I have the same issue in here =(
Did you figure it out already??