Axel Samyn
Axel Samyn

Reputation: 123

Unity 5 : Non-convex mesh collider & Is Trigger

I'm having some troubles checking the "Is Trigger" option on a non-convex mesh collider.

I looked for an answer on the internet and found something like :

Unity 5 does not support that because the updated PhysX does not allow it.
(https://forum.unity3d.com/threads/how-to-enable-trigger-on-a-mesh-collider.347428/)

I was wondering if there was a solution now? Since the post is kind of outdated?

I hope you'll be able to help me :P

Thank you in advance,

Axel

Upvotes: 4

Views: 11133

Answers (1)

Absinthe
Absinthe

Reputation: 3391

A mesh collider can collide with a primitive collider (box, sphere, capsule) but there is no way to have two mesh colliders register a trigger or collision.

You'll need to use compound colliders to approximate the shape. IMO although it seems imprecise at first in practice you hardly notice if your collision area is slightly outside of your mesh. Performance wise multiple primitives (on anything other than mobile at least) are next to nothing so don't be afraid to use as many colliders as you need to approximate your shape.

Upvotes: 0

Related Questions