Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

Photon animation speed and affect other players

$
0
0
Code (CSharp):
  1.  
  2. Animator anim;
  3. int playerID;
  4.  
  5.     void OnTriggerEnter(Collider other){
  6.         if(other.gameObject.CompareTag("LuckyBox")){
  7.             if(playerID==1){
  8.             GetComponent<PhotonView>().RPC("animSpeed",PhotonTargets.AllBuffered,null);
  9.            }
  10.         }
  11.        
  12.     }
  13.  
  14.     void Start () {
  15.         playerID = PhotonNetwork.player.ID;
  16.         anim =photonView.GetComponent<Animator>();
  17.     }
  18.  
  19.     [PunRPC]
  20.     void animSpeed(){
  21.         anim.speed=0.5f;
  22.     }
I am...

Photon animation speed and affect other players

Viewing all articles
Browse latest Browse all 16796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>