i want to destroy an object with a specific view ID, i can get the view id from a collision, now i want to use it in order to destroy that specific gameobject. (the gameobject is a player). this is my attempt.
[RPC] void OnCollisionEnter (Collision collision) {
//Destroy (GameObject);
if(collision.gameObject){
//this is all failed attempts to try to do this..
int denis = collision.contacts[0].otherCollider.GetComponent<PhotonView>().viewID;
PhotonNetwork.Destroy (photonView.viewID (denis));
Debug.Log ("view id of hit:" + denis);
thanks in advance!