btCylinderShape with different radius in X/Z

Pacha
Posts: 26
Joined: Sat Jun 15, 2013 2:29 am

btCylinderShape with different radius in X/Z

Post by Pacha »

I have a platform generator in my game, and I have a platform that has a cylindrical shape. When the radius is the same in the X and Z part of the platform, the btCylinderShape is perfect for what I want to do and I don't have a problem.

The thing is that when I pass a different value for X or Z, the cylinder doesn't scale properly and it is really short, when it should be larger in the Z or X part, and smaller on the other axis.

What would be the best way to implement this? I can't use a btBoxShape because some platforms are very big.

Here is an image (bottom-right is a cylinder with the same radius, and top-left is platform with different radius in the X and Z axis):

Image