Physics and GUI Events
Understand the usage of physics and GUI event functions that Unity offers.
We'll cover the following...
Physics events
Collisions reported by the physics engine come under the umbrella of physics events. The events responsible for detecting changes to such a collision are OnCollisionEnter
, OnCollisionStay
, and OnCollisionExit
. For Colliders that have the “Is Trigger” property turned on, the equivalent events for them are OnTriggerEnter
, OnTriggerStay
, and ...