Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

void ontriggerenter not working

2D for 2D (OnTriggerEnter2D) and 3D for 3D (OnTriggerEnter)
at least one object needs to have rigibody, and collider set to isTrigger

yea and this is for unity game engine only
Comment

ontriggerenter unity not working

void OnTriggerEnter (Collider other)
     {
         if (other.gameObject.tag == "Object") 
         {
             Debug.Log ("Collided");
         }
  
//at least one object needs a rigidbody, and a collider set to isTrigger.
//the problem may be that you put it in a void, you need to take it out of voids for it to work
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to make an object move in unity 
Csharp :: topdown unity 
Csharp :: c# how to write an array in a single line 
Csharp :: c# create object with properties 
Csharp :: how to create a file through c# script 
Csharp :: palindrome number c# 
Csharp :: unity find gameobject 
Csharp :: Get key by his value on Dict C# 
Csharp :: Unity Rigidbody how to set zero momentum 
Csharp :: c# type from string 
Csharp :: c# timestamp now 
Csharp :: c# list tuple 
Csharp :: c# ftp file download 
Csharp :: c# loop string array 
Csharp :: string reverse c# 
Csharp :: c# read file from directory 
Csharp :: difference two list c# 
Csharp :: redirect to another controller page in asp.net core 
Csharp :: c# remove character from string at index 
Csharp :: letter at index of string c# 
Csharp :: decimal c# 2 digits 
Csharp :: httpcontext.current.session null c# in class library 
Csharp :: c# Get type with namespace 
Csharp :: how to create a random vector2 in unity 
Csharp :: c# add to array 
Csharp :: Operator Overloading | C# 
Csharp :: calculate distance using latitude and longitude c# 
Csharp :: recursive reverse linked list 
Csharp :: c# datagridview rows clear not working 
Csharp :: convert xml string to file c# 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =