Approximate a shape with holes by a set of rectangles

elLolo
Posts: 14
Joined: Thu Dec 11, 2008 2:18 pm

Approximate a shape with holes by a set of rectangles

Post by elLolo »

Hi!

I have a car hood with 3 holes that I would like to approximate for collision detection.

To simplify, let us assume that I have only a ring to approximate for collisions that is a dynamic object. I put horizontal 3D rectangles along the ring's path hole. Each of these rectangles overlaps a bit its closest two neighborhoods to avoid small gaps.
This ring is then put on a rod and someone can pull this ring horizontally to himself thanks to a Point2Point constraint.

I expect that the ring would stay on the rod but it goes out very rapidly, especially when the ring is not horizontal anymore. It seems that the rod goes through a gap -- which I cannot see and that should not exist -- to leave.

Any advice?


Rgds,
Laurent.
elLolo
Posts: 14
Joined: Thu Dec 11, 2008 2:18 pm

Re: Approximate a shape with holes by a set of rectangles

Post by elLolo »

I provide here some screenshots to show you how I approximate the physical model of the hood.

In my source code, I use btCollisionShape to store all of the the collision shape. This shape is obtained with only one btConvexHullShape.


Do I do something wrong?
You do not have the required permissions to view the files attached to this post.