daily pastebin goal
5%
SHARE
TWEET

SendInfo.cs

a guest Aug 3rd, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class SendInfo : MonoBehaviour {
  5.    
  6.  
  7.     void Start () {
  8.    
  9.     }
  10.    
  11.  
  12.     void Update () {
  13.    
  14.         bool RMB = Input.GetMouseButtonDown (1);
  15.  
  16.         if (RMB) {
  17.  
  18.             RaycastHit hit;
  19.             Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
  20.  
  21.             if (Physics.Raycast(ray, out hit) && hit.transform.tag == "Ground"){
  22.                
  23.                 this.GetComponent<PhotonView>().RPC("RecievedMove", PhotonTargets.All, hit.point);
  24.                
  25.             }
  26.  
  27.  
  28.         }
  29.  
  30.     }
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top