{"action":"opened","issue":{"url":"https://api.github.com/repos/heed13/CS-3540-Borderlands/issues/6","labels_url":"https://api.github.com/repos/heed13/CS-3540-Borderlands/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/heed13/CS-3540-Borderlands/issues/6/comments","events_url":"https://api.github.com/repos/heed13/CS-3540-Borderlands/issues/6/events","html_url":"https://github.com/heed13/CS-3540-Borderlands/issues/6","id":110257446,"number":6,"title":"networked bullet performance","user":{"login":"heed13","id":9547071,"avatar_url":"https://avatars.githubusercontent.com/u/9547071?v=3","gravatar_id":"","url":"https://api.github.com/users/heed13","html_url":"https://github.com/heed13","followers_url":"https://api.github.com/users/heed13/followers","following_url":"https://api.github.com/users/heed13/following{/other_user}","gists_url":"https://api.github.com/users/heed13/gists{/gist_id}","starred_url":"https://api.github.com/users/heed13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heed13/subscriptions","organizations_url":"https://api.github.com/users/heed13/orgs","repos_url":"https://api.github.com/users/heed13/repos","events_url":"https://api.github.com/users/heed13/events{/privacy}","received_events_url":"https://api.github.com/users/heed13/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-07T15:52:40Z","updated_at":"2015-10-07T15:52:40Z","closed_at":null,"body":"Think I could improve this if instead of networking the bullet I create a copy of its model on each client.\r\nsomething along the lines of the code below:\r\n\r\nvoid SpawnMyPlayerEverywhere()\r\n{        \r\n    //Manually allocate PhotonViewID\r\n    PhotonViewID id1 = PhotonNetwork.AllocateViewID();\r\n    photonView.RPC(\"SpawnOnNetwork\", PhotonTargets.AllBuffered, transform.position,\r\n        transform.rotation, id1, PhotonNetwork.player);\r\n}\r\npublic Transform playerPrefab; //set this in the inspector\r\n[PunRPC]\r\nvoid SpawnOnNetwork(Vector3 pos, Quaternion rot, PhotonViewID id1, PhotonPlayer np)\r\n{ \r\n    Transform newPlayer = Instantiate(playerPrefab, pos, rot) as Transform;\r\n    //Set the PhotonView\r\n    PhotonView[] nViews = go.GetComponentsInChildren<PhotonView>();\r\n    nViews[0].viewID = id1;\r\n}"}}