Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

OnCollision update

 bool collided;
 
 void OnCollisionEnter(){
     collided =true;
 }
 
  void OnCollisionExit(){
     collided =false;
 }
  void Update(){
     if (collided){
           ...
     }
 }
 
PREVIOUS NEXT
Tagged: #OnCollision #update
ADD COMMENT
Topic
Name
4+1 =