Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

OnCollision update

 bool collided;
 
 void OnCollisionEnter(){
     collided =true;
 }
 
  void OnCollisionExit(){
     collided =false;
 }
  void Update(){
     if (collided){
           ...
     }
 }
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# kill all processes by name 
Csharp :: unity time.deltatime timescale 0 
Csharp :: delay in unity 
Csharp :: custom editor unity 
Csharp :: c# get current milliseconds 
Csharp :: how to create a rounded custom panel c# 
Csharp :: c# quit 
Csharp :: c# change cursor 
Csharp :: how to check if list index is out of range in c# 
Csharp :: unity create button with parameter 
Csharp :: unity list of gameobjects 
Csharp :: set ads for children admob unity 
Csharp :: UnityEngine.Transform.get_position () (at <a0ef933b1aa54b668801ea864e4204fe:0) Gamekit3D.MeleeWeapon.BeginAttack (System.Boolean thowingAttack) 
Csharp :: c# string to uri 
Csharp :: Use tuple to swap values c# 
Csharp :: InvalidOperationException: Calling Scene Raisefrom assembly reloading callbacks are not supported. 
Csharp :: c# memorystream to byte array 
Csharp :: C# define a block as text 
Csharp :: asp.net throw unauthorized exception 
Csharp :: c# random string 
Csharp :: How can I cast string to enum? 
Csharp :: unity animator current state name 
Csharp :: get item from icollection 
Csharp :: .net: setting max size for sql parameter 
Csharp :: += meaning c# 
Csharp :: c# console play sound 
Csharp :: unity custom editor save changes 
Csharp :: key press up unity 
Csharp :: parse int in c# 
Csharp :: c# start file 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =