Point cloud, sphere/capsule and sphere/cylinder collisions

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
random
Posts: 5
Joined: Fri Jan 25, 2019 12:28 pm

Point cloud, sphere/capsule and sphere/cylinder collisions

Post by random »

Hello,

I needed to get collisions between simple shapes (cylinders) and a complex convex dynamic object.
Among many things I tried, the easiest solution turned out to represent the surface of the complex object as a point cloud of vertices modeled as spheres of radius 0. As long as (a) distance between vertices is small compared to the objects it collides with and (b) there are generous collision margins on the other objects, it seems to work reasonably well. Obviously, with large number of points speed is important.

So I wonder:
Is using point cloud as a collision shape a reasonable approach or is there a better way?
What is the overhead of having lots and lots of little spheres in a single compound shape? Or do I need to create a custom shape with an array of vertices? (BTW: It seems I cannot create custom shapes outside of the library because all the shape type enum values are taken)

Also I implemented custom Sphere/Capsule and Sphere/Cylinder collisions. These turned out quite straightforward (with no special cases) and I think they must be faster then generic convex algorithm, although I didn't have a chance to test it thoroughly.
Is there a particular reason why it has not been done before?

Any other ideas/suggestions?

Thanks,
R
Post Reply