when I connect via the network. my character launches a rocket and the character who connects does not see how I fire a rocket
This script is tied to the character.
public GameObject Rocket; //ракеты спаунятся только у мастера if (photonView.isMine) { //вызываем объект ракету и придаем ей силу Instantiate(Rocket, transform.position + transform.forward * 2, transform.rotation); } This script is tied to a rocket.
public int power; void Start () { gameObject.GetComponent<Rigidbody>().AddForce(transform.forward * power); }