Hello,
I am scripting events to happen when they collide with player object, this codeworked at some point but than i did something i guess and now it no longer works, i tried to use trigger zones etc. but it didnt really help, i think i am missing something. I know this is probably something simple but i haven been searching for an answer for sometime and nothing works. I would love to know what are the requirements for collision detection to work. ( like having a rigid body etc, mesh etc.) Thanks in advance.
using UnityEngine;
using System.Collections;
public class onHitLoadLevel : MonoBehaviour {
void OnTriggerEnter(Collider temas) {
if(temas.gameObject.tag=="Player"){
print("hit");
}
}
}