Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity ignore collision between two objects

private void OnCollisionEnter(Collision collision)
{
	if (collision.gameObject.layer == layerToIgnore)
    	Physics.IgnoreCollision(collision.gameObject.GetComponent<Collider>(), GetComponent<Collider>());
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity create gameobject 
Csharp :: unity rotation 
Csharp :: slider.onchanged in unity 
Csharp :: how to make an object appear and disappear in unity 
Csharp :: convert from xls to xlsx C# 
Csharp :: if unity 
Csharp :: how to make a car in unity 
Csharp :: convert array object to int[] c# 
Csharp :: c# create array 
Csharp :: visual studio fix formatting 
Csharp :: topdown unity 
Csharp :: C# How to read users input and display it 
Csharp :: c# get pressed key 
Csharp :: c# string array contains 
Csharp :: c# type from string 
Csharp :: = in c# 
Csharp :: what is public static void 
Csharp :: how to instantiate a gameobject 
Csharp :: blazor swagger setup 
Csharp :: change button color in script unity 
Csharp :: how to verify the scene unity 
Csharp :: unity instantiate prefab rotation 
Csharp :: letter at index of string c# 
Csharp :: check shell command success 
Csharp :: get out of foreach statement c# 
Csharp :: get value from config file c# 
Csharp :: jagged array c# 
Csharp :: git find commits by file path 
Csharp :: c# write to output window 
Csharp :: string to datetime c# 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =