I want to make an if something happens then the collider of a gameobject becomes a trigger.
i tried something along these lines: gameObject.GetComponent.Collider().true;
Which is probably extremely wrong
This is the part of the script in which it has to be used:
void OnTriggerEnter(Collider trigger)
{
if(trigger.gameObject.tag == "Enemy")
{
//and here it has to make the is trigger in the collider of the gameobject enabled.
}
}
I hope i gave a good explanation of my problem/question.
If you dont understand something please ask.