Is it possible to create an ellipsoid shape in Bullet?

Post Reply
PgrAm
Posts: 12
Joined: Sun Apr 15, 2012 3:34 pm

Is it possible to create an ellipsoid shape in Bullet?

Post by PgrAm »

So I have an object that I need to represent that is roughly ellipsoidal, basically a squashed sphere. Can I simply make this with a btSphereShape and setting the local scaling? or are there drawbacks with this approach? Since bullet doesn't seem to come out of the box with an ellipsoid shape, what would be the best way to represent one?
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: Is it possible to create an ellipsoid shape in Bullet?

Post by drleviathan »

I've never personally used scaling on spheres however upon inspection of the code it looks like btSphereShape derives from btConvexInternalShape which has a m_localScaling data member. Try it and maybe it will work.

Alternatively, you could use a btConvexHullShape. It is possible to set the collision margin large to get smoothed out the facets of such a shape.
Post Reply