- Home /
 
Bullet on network
Hi! Help me please! I have a script to the shoots. When I shoot with me shoot another player, while he does not see what I was shooting, how to fix it?
     public GameObject bullet;
     
     public float force;
     
     void Start () {
     
     }
     
     
     void Update () {
             
             if( Input.GetMouseButtonDown(0) )
             {
                     
                     if (bullet)
                     {
                             
                             GameObject go = Instantiate(bullet, transform.position, transform.rotation) as GameObject;
                             
                             go.rigidbody.AddForce(transform.forward * force, ForceMode.Impulse );
                     }
             }
     }
 
               P.S. Sorry for my bad English :)
               Comment
              
 
               
              Answer by programmrzinc · Nov 14, 2012 at 06:55 PM
I personally would use a Raycast as a bullet and to a hit test. and then send the Boolean and location through RPC.
Your answer
 
             Follow this Question
Related Questions
Host unity game with photon 0 Answers
Instantiated over the client side by a photonviewed object? 1 Answer
Add force to bullet in the network 3 Answers
Sync animaor of child prefab 0 Answers
How can I get PhotonPlayer GameObject 0 Answers