We've been playing around with the photon demo for quite some time now, We have wrote a simple script for our _controller which is really only recieving a click and a texture change, sync position and rotation over photon no animations required as of yet early development build, A example of what we trying to achieve is click a ball velocity in a forward fashion and change texture upon every click using OnMouseDown as developing for andriod, We have the behaivour triggering isControllable but there still seems to be input on other players/objects in the scene we've tryed to make a check to see if it isControllable but now it just skips that part of our code and changes the texture or sometimes skips the whole lot. Here is our script that we wrote in C-Sharp.
using UnityEngine;
using System.Collections;
public class MouseClick : MonoBehaviour {
void Start ()
{
Random.seed = (int)Time.time;
}
public bool isControllable = true;
void OnMouseDown(){
if (isControllable ==true)
{
if (this.isControllable)
rigidbody.AddForce(-transform.forward * 500);
rigidbody.useGravity = true;
float r = Random.Range(0f,1f);
float g = Random.Range(0f,1f);
float b = Random.Range(0f,1f);
Color randomColour = new Color(r,g,b,1f);
renderer.material.color = randomColour;
}
}
}Your help would greatly be appreciated
Thanks in Advance