collider other unity code example
Example 1: unity on trigger enter
//for unity c#
private void OnTriggerEnter(Collider other)
{
// code
}
Example 2: ontriggerenter
private void OnTriggerEnter(Collider other)
Example 3: 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>());