- Home /
How do I get my object to trigger a UI screen when it touches another object?
I am creating a driving game whereby you have to dodge obstacles in the road... I want it so that when you hit an obstacle it causes a UI screen to pop up saying that "You Crashed" with a retry button and exit button.
Comment
Answer by ShadoX · Jan 10, 2014 at 09:30 AM
Use either http://docs.unity3d.com/Documentation/ScriptReference/Collider.OnTriggerEnter.html or http://docs.unity3d.com/Documentation/ScriptReference/Collider.OnCollisionEnter.html and do a little check inside them to make sure that it actually responds to the collisions you want and not just everything :)