Before updating to Windows 10 you may need to return your Pro license. More information here

Mesh collider trigger

I'm trying to trigger an event when my golf ball goes through an object. I've created a customized object using Maya, imported the object and gave it a mesh collider, then checked "is trigger." The problem is, the ball doesn't actually set off the trigger! I've checked to make sure the obect is tagged correctly. The golf ball has a sphere collider on it as well as a rigid body.

The only way to set off the trigger is for me to set the customized object to "convex". Even then, the golf ball doesn't go through it, it just collides with it (a result that I do not desire). Isn't convex only neccessary if BOTH objects have mesh colliders? Or do I need to use convex if I have one mesh collider and one sphere collider? Does anybody see a mistake or something I'm overlooking here?

more ▼

asked Oct 06, 2011 at 05:53 PM

avatar image

166 70 52 55

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

This depends. You haven't told what shape your mash has? Is your mash a kind of a ring?

If it's a ring and your ball shoots through the mesh, then it's obvious, why it doesn't trigger, because the ball doesn't touch the mesh at all, when it goes exactly through the hole. When you check "convex" collider however, the hole disappears and becomes "solid" (you can see this, when you closer inspect it, you'll notice that the green collider lines go though the middle of your mesh).

Convex basically closes holes. I'll post an image of an example soon

edit: alt text

As you can see, the convex mesh is much simpler than the actual mesh and will even trigger on areas where no mesh is there.

more ▼

answered Oct 06, 2011 at 10:54 PM

avatar image

1.7k 15 20 39

Golf balls are kind of tiny. Do you think the problem might be because of it 'phasing' through between physics steps?

Oct 07, 2011 at 01:26 AM syclamoth

Dunno, but you can check this in the frame-by-frame feature. If it passes through the collider from one frame to the other, without touching the collider, it's probably the too fast thing.

What shape is the mesh you're using?

Oct 07, 2011 at 03:44 AM Tseng
(comments are locked)
10|3000 characters needed characters left

My mesh is a totally unique object that was custom built to fit into an oddly shaped sand bunker (I'm working on a golf mini game). There are no holes in the mesh as mentioned by Tseng. I will look into using the frame by frame feature to figure out if it is in fact moving to fast. If this is the case though, wouldn't setting the Collision Detection (under rigid body) to continuous fix the problem? Or perhaps continuous dynamic?

more ▼

answered Oct 07, 2011 at 10:19 PM

avatar image

166 70 52 55

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Oct 06, 2011 at 05:53 PM

Seen: 2965 times

Last Updated: Oct 07, 2011 at 10:19 PM