This question was
closed Jan 27, 2017 at 06:19 PM by
HenryStrattonFW for the following reason:
Question is a direct repeat of a previous question a few days prior. please do not post the same question multiple times. http://answers.unity3d.com/questions/1301378/oncollisionexit-not-working.html
Question by
marshel126 · Jan 24, 2017 at 03:19 PM ·
collisioncollidergravitycollision detectionontriggerexit
ontriggerexit not working
I have a code for a platform that falls once the player leaves it, but the player just falls through the platform instead of standing on it. The code is: public GameObject player;
void Start () {
rb = GetComponent<Rigidbody> ();
}
void OnTriggerExit(Collider other){
if (other.gameObject.CompareTag ("player")){
rb.useGravity = true;
}
}
Any fixes?
Comment