2
votes

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

1
I only heard about hacky workarounds :( What kind of mesh is this ? Does it really need a mesh collider ? Sometimes box/sphere colliders can do the job while maintaining the illusion.FLX
Well imagine a temple run like game with tetris blocks as obstacles... We wanted to place a single trigger/mesh collider on our "u" block"Axel Samyn

1 Answers

0
votes

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.