Why OnTriggerStay does not work in case of A and B.
A is gameobject that has big box collider, and B is child gameobject of A and B’s mesh collider is small and already located inside of A’s box collider.
I attached script to A and wrote,
function OnTriggerStay(other : Collider){
if(other.gameObject.name == "B"){
if(turnOn){
other.gameObject.renderer.enabled = true;
}
else{
other.gameObject.renderer.enabled = false;
}
}
}
but this does not work when turnOn become true.