OnTrigger
OnTrigger is a common term in game development, particularly within physics engines, referring to an event that occurs when two colliders intersect and at least one of them is marked as a trigger. A collider is a shape that defines the physical boundaries of a game object. When one collider enters the volume of another, and that other collider is set as a trigger, an OnTriggerEnter event is usually invoked. Similarly, when a trigger collider exits another, an OnTriggerExit event is fired, and while a trigger collider remains within another, an OnTriggerStay event is continuously triggered.
Triggers are distinct from standard colliders because they do not produce physical responses like collisions. Instead,