In the API reference, it is says that all the parameters are half extents, but due to my test, the first is the width and the second is the radius, but I still don't know what the third parameter means, does anyone know how can I find out the exact meaning of each parameter of the functions in bullet engine?
thanks
what does the third parameter in btCylinderShape mean?
-
- Posts: 5
- Joined: Sun Jul 11, 2010 2:29 am
-
- Posts: 144
- Joined: Fri Aug 01, 2008 6:36 am
- Location: Bonn, Germany
Re: what does the third parameter in btCylinderShape mean?
AFAIK, btCylinderShape is Y axis aligned, so the halfExtends[1] is length/2 and radius is halfExtends[0] and halfExtends[2]. (Should have the same value). Correct me please if it is wrong :-/
-
- Posts: 5
- Joined: Sun Jul 11, 2010 2:29 am
Re: what does the third parameter in btCylinderShape mean?
But when I set the two radius with different number, the cylinder still has a round shape but eclipse, and when the third parameter is set to be very large, the cylinder is acting very hard to move, and when it is below zero, the cylinder can go through the floor, do I have to read the resource code to know the meanings of the parameters? because I can't find everything I need in the API reference.
thanks
thanks
-
- Posts: 51
- Joined: Sun Nov 23, 2008 4:43 pm
Re: what does the third parameter in btCylinderShape mean?
The half extends contain three values, two of which is the radius, and the third is half the height of the cylinder.
Which value goes where, depends on which class you use.
E.g. btCylinderShapeZ has its axis in Z, so you would construct it as:
Which value goes where, depends on which class you use.
E.g. btCylinderShapeZ has its axis in Z, so you would construct it as:
Code: Select all
wheelshape = new btCylinderShapeZ( btVector3( radius, radius, height/2 );