Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class SendInfo : MonoBehaviour {
- void Start () {
- }
- void Update () {
- bool RMB = Input.GetMouseButtonDown (1);
- if (RMB) {
- RaycastHit hit;
- Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
- if (Physics.Raycast(ray, out hit) && hit.transform.tag == "Ground"){
- this.GetComponent<PhotonView>().RPC("RecievedMove", PhotonTargets.All, hit.point);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement