Page 1 of 1

Is it possible to create an ellipsoid shape in Bullet?

Posted: Sun Feb 19, 2023 8:59 pm
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?

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

Posted: Mon Feb 20, 2023 5:07 am
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.