pb OnCollisionEnter

i have a simplest application :
2 cubes,
each one have a box collider and IsTrigger Checked
(no rigidbody , free version of unity)

i add the code above in a script applied to one box.
BUT
this functions are NEVER called ?

What is wrong with this simple test ?
NB : i read document of this function in MonoBehavior class documentation :frowning:

function OnCollisionEnter(collision : Collision) {
print(“enter”);
}

function OnCollisionStay (collisionInfo : Collision){
print(“stay”);
}

1 Answer

1

First you need to change the function to OnTriggerEnter( collision :Collider)

Second what is entering these trigger volumes? You will need to have some moving rigidbody to pass through the cube volume.
(Same for the Stay function… Collision is for colliders with IsTrigger turned off.