'Why isn't this collision being triggered?
I have this script attached to a game object in unity that when touching another gameobject with the tag "wisdom", will trigger this event. there are no error codes, and the debug.log isn't working either.
using System.Collections.Generic;
using UnityEngine;
public class range : MonoBehaviour
{
public GameObject big;
// Start is called before the first frame update
public void OnTriggerEnter(Collider col){
if(col.gameObject.tag == "wisdom"){
Debug.Log("yourmother");
big.SetActive(true);
}
}
public void OnTriggerExit(Collider col){
if(col.gameObject.tag == "wisdom"){
big.SetActive(false);
}
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
