So I have an empty object with a capsule collider, marked as a trigger. I want to make it so it will output the tags of the game objects, that collide with it, but I don’t know why, it won’t work.
function OnTriggerExit(collision : Collider){
print(collider.transform.tag);
}
function OnTriggerStay(collision : Collider){
print(collider.transform.tag);
}
Sorry for that dumb question, I sometimes get stuck with really dumb things and can’t get them to work.
Well of course, I can see the capsule collider in the editor and also Is Trigger is checked. Pretty trange, huh? I need to check if the collider is toching something…anything.
Yes, I have read those (thanks though). I don’t know what’s happening. For example if I rub the object aganst a wall (the object is placed at the RaycastHit.point of a raycast, taht goes from the camera) it will output the wall’s tag, but not always. I can’t say the same things for rigidbodies though, it won’t count them. The layer that this object is in collides with everything.