unity use collider as trigger code example
Example: how to use triggers in unity
//for collision detection
void OnCollisionEnter(Collision collision)
{ }
// for use of triggering
void OnTriggerEnter(Collider other)
{}
//for collision detection
void OnCollisionEnter(Collision collision)
{ }
// for use of triggering
void OnTriggerEnter(Collider other)
{}