- Home /
Collision stuck issue
//Temporarily make the object ignore collision
Physics.IgnoreCollision (spitObject.collider, this.collider);
I have a character who spits out things. However, every time when it spits a GameObject out the object glitches and gets stuck with the collider of the character. Using IgnoreCollision doesn't seem to help much.
I then remove the ignore because later on this object needs to be re-collided again:
public void OnCollisionExit(Collision collision)
{
Physics.IgnoreCollision (collision.collider, this.collider, false);
}
An demo of the game can be found here: http://calclavia.com/blurgh/Development%20Builds.html (Left click an object to eat, right click to spit it out)
Comment