Can some one give me a script for a trigged pause menu with a resume button. So my car drives throught the collider, it pauses, and then to resume i have to click the resume button?
Feb 13 '12 at 07:07 AM
Feb 13 '12 at 05:19 AM
How about this?
// Set this up in the inspector
public Collider car;
bool paused = false;
void OnTriggerEnter(Collider other)
if(other == car)
paused = true;
Time.timeScale = 0;
Time.timeScale = 1;
paused = false;
Feb 13 '12 at 07:19 AM
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
Once you sign in you will be able to subscribe for any updates here
Answers and Comments
The best place to ask and answer questions about development with Unity. Check out our FAQ for more information.
To help users post good questions and use the site effectively we have posted a tutorial video. Please check it out.
asked: Feb 13 '12 at 07:07 AM
Seen: 433 times
Last Updated: Feb 13 '12 at 07:19 AM
How do I check that a trigger collider is *completely* nested within another trigger collider?
Can i Move/Rotate triggers without Rigidbodies? And other collider questions.
pickups used to open doors
How can I get multiple objects with triggers, and standard collisions to work together?
When player enters triggerzone call function
Having problems with playing a sound (C#)
How to Manually Test Trigger Overlap
On Trigger enters being called a frame late
How to have multiple colliders intersect without colliding with each other?
Trigger in child object calls OnTriggerEnter in parent object