Hey Everyone,
I put a sphere collider to my game object and it detects collisions, now i want to turn the mesh renderer of the parent so when it detcts the right collision it will be gone. I found some examples in java but cant turn it into c# any help is appreciated.
public class test1 : MonoBehaviour {
public GameObject Baba;
// Use this for initialization
void OnTriggerEnter (Collider temas)
{
if (temas.gameObject.tag == "Player") {
GetComponent<Baba.Renderer>.enabled =false;
}
}
}