- Home /
Ignoring collisions with...everything
I know of the Physics.IgnoreCollision function, but is there a way to just simple....ignore every collision? Or disable the collider mesh in code?
Comment
Best Answer
Answer by Tuti · Mar 25, 2010 at 07:48 PM
If you still want to check if an object collided to another but don't want the physics to react with the object then you check or enable the "IsTrigger" in the Inspector.
through the code it would be:
function Update() {
collider.IsTrigger = true;
}
Hope that helps.
Just an fyi, you shouldn't be setting collider.isTrigger inside of the Update loop as it occurs every frame. ins$$anonymous$$d set it in either Awake() or Start()
Yeah I figured lol. I just set it once in an appropriate function and it's working fine.