I used dMassSetCylinder to create a cylinder. But when I change the direction value (1=x, 2=y,3=z), the axis of cylinder is not changed ( axis is alway z ).
The code dMassSetCylinderTotal adjust the correct part of the inertia matrix based on the axis. dMassSetCylinder just forwards the direction parameter. Either you mean that it's failing to set the inertia matrix according to the direction, which contradicts the code, or you mean something else entirely. Could you please clarify what exactly is happening and what were you expecting?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The code dMassSetCylinderTotal adjust the correct part of the inertia matrix based on the axis. dMassSetCylinder just forwards the direction parameter. Either you mean that it's failing to set the inertia matrix according to the direction, which contradicts the code, or you mean something else entirely. Could you please clarify what exactly is happening and what were you expecting?