- Home /
OnTriggerEnter problem
Hello! I have two objects. First object is moving through another one. But I have not seen calling of either OnTriggerEnter or OnTriggerExit. Why it could be ?
I can send you my project. It is very simple project.
Answer by Vinpasso · Feb 03, 2011 at 08:51 PM
Ok ive located your problem:
You are trying to collide two meshes with each other. However unity will only accept mesh on mesh collisions if the convex check mark is activated on each collider (this limits mesh collider vertices for performance). So if you go onto your two mesh colliders then you see the convex parameter under the trigger parameter. Now run your Application.
Hope this Helps Vinpasso
Yes. I know about it. But, in this case my big object is like a parallelepiped without the hole. This is a big problem. Because I don't want to have a collision when my small object goes through the hole.
I have two harder ways to do it but im sure somebody knows a simpler solution
Could you tell me your ideas ? Let's try to get solution together! I think this problem is not only $$anonymous$$e.
what I think would be possible is have a box collider but then a sub cylindrical collider which turns the collider register off when the cube OnTriggerEnters and turns it on again in OnTriggerExit
Answer by Vinpasso · Feb 03, 2011 at 08:14 PM
Could it be that both of your colliders are actual Colliders? In this case you would need to mark the "Trigger" check mark in the Inspector of each object or use OnCollision Enter and Exit instead depending on the behaviour you want.
In case this is not a solution i am happy for you to send me the files here: vbode@poach-studios.com
Your answer