How to prevent my ball going through my bowl wit a trigger?

Viewed 31

enter image description hereenter image description here Hi guys, So i have this bowl (i made in blender), and a ball inside it. My bowl has mesh collider, convex and trigger, as well rigidbody . I know if the bowl is on trigger the ball can go right through. But the thing is i need the trigger on the bowl so my claw can grab it and pull it. The ball keeps going down through my bowl. Is there a way to have my ball in the bowl without going through the bowl with a trigger. Btw even if the bowl isnt on trigger the ball still goings through and the ball is not on trigger. please help! Im desperate :( I just need this to work .

1 Answers

Can your claw not have the trigger and make the bowl have a normal collider?

The alternative would probably be

  • create a child object of the bowl
  • attach a MeshCollider
  • assign the very same mesh of the bowl to this new collider
  • make this one a normal "non-trigger"
  • assign your original bowl a new layer like e.g. Grabable (but no to the child)
  • assign your claw a new layer e.g. Grab

And finally adjust the physics settings -> Collision Layer Matrix so that

  • Grab only collides with Gravable
  • Grabable only collides with Grab

This way your claw can only interact with those things set on the Grabable layer while everything else can collide between each others.

You could consider though to not use MeshCollider (which is of course expensive) but rather simple Sphere/Capsule/BoxCollider according to the objects forms since the trigger doesn't need to be absolutely exact I assume

Related