- Home /
 
               Question by 
               L1vD3v · Jan 05, 2015 at 10:00 PM · 
                javascriptcollidervariablecolliders  
              
 
              Collision timer help
I have a script, which checks to see if an item, is being hit by another object. Now my question, is there a way to check for how long time, the item and the object has collided? It is to turn off the boolean in the script, if the collision has hit a specific time.
My code.
 static var stickInMotion : boolean = false;
 
 function Update (){
 
 if (stickInMotion == true){
 Debug.Log("StickInMotion == true");
 }
 
 }
 
 function OnTriggerEnter(other : Collider){
 
 if (other.gameObject.tag == "Flipper") {
 stickInMotion = true;
 }
 
 }
               Comment
              
 
               
              Your answer
 
 
             Follow this Question
Related Questions
Multiple Colliders Issue 3 Answers
Adding varibales from other scripts 3 Answers
How to transform a sphere collider 1 Answer
OnTriggerEnter with variable 2 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                