Hello,
I have the following code on an a simple cube with a box collier I set to is trigger
void OnTriggerStay(Collision Col){
if (Col.gameObject.tag == "Player") {
Col.gameObject.rigidbody.AddForce (new Vector3 (0, 10000000f, 0));
}
Col.gameObject.rigidbody.AddForce (new Vector3 (0, 10000000f, 0));
}
}
If I change the word Trigger to Collision and uncheck the box it works perfectly shooting the palyer into the sky on collision.
I have no idea why this trigger isn’t working. I have tried adding a rigid body to it although there is one on the player. I have tried a million things. Please help me.