- Home /
Ignore collisions between two characters rpc
Hello I can not ignore the collisions between all the characters here my method rpc
[PunRPC]
private void IgnoreColision(int viewId)
{
GameObject[] PlayerTarget = GameObject.FindGameObjectsWithTag("Liam");
foreach(GameObject go in PlayerTarget)
{
if(go.GetPhotonView().viewID == viewId)
{
Physics.IgnoreCollision(transform.GetChild(0).gameObject.GetComponent<CapsuleCollider>() , go.GetComponent<CapsuleCollider>(),true);
Debug.Log(go.GetPhotonView().viewID);
}
}
}
I use photon but in be is the same way to communicate
Comment
Your answer
Follow this Question
Related Questions
Update int value with photon rpc? 0 Answers
Photon PUN2, Rpc score can't correctly. 1 Answer
Network RPC find sender gameobject 2 Answers
More efficient way to call these RPC's (Code works) 1 Answer