Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to make colliders collide with some things but not other in unity

//ignores all collisions between the object collided with and the 
	//gameobject that this script is attached to

Physics.IgnoreCollision(
	collision.gameObject.GetComponent<SphereCollider>(), 
	gameObject.GetComponent<SphereCollider>());
 
PREVIOUS NEXT
Tagged: #colliders #collide #unity
ADD COMMENT
Topic
Name
1+2 =