I have been making a stealth game and am using invisible cones with mesh colliders attached to represent the vision of enemies. However, when I try to walk through their vision, it only triggers the collider when I move around for a bit. Niether object has a Rigidbody, so I am unsure why it is happening occasionally but not consistently. I have checked to make sure that I am actually colliding with the object by enabling the mesh renderer and I have checked the normals of the faces. Has anyone had this problem or know how to fix it?
This is wanted behavior by the CharacterController, which is selected for optimization reasons by Unity and so far I know of no ways to remove it. Basically, if the CharacterController becomes perfectly still, it doesn’t register collisions. However, rigidbodies always register collisions, so you might want to move the detection on the cone and fire your events from that script, instead from the player’s perspective. That way you will at least have consistency.
This and a couple of other reasons are why I make my own controllers instead of using this one. I suggest you do the same if it doesn’t throw you off track that much.
Thanks for the advice, I think making my own controller would be the best idea, but I am unsure how to do that. Do you know of any tutorials to do it, or if not, does it basically involve a mesh collider, a rigidbody, and some scripting?
Yes. You can find some ready to use custom controllers on the wiki.
http://wiki.unity3d.com/index.php/Scripts/Controllers
There’s all sorts of cool stuff in there, check it out.