Multibody: my shape is ill rotated after 1st timestep

Post Reply
alexp
Posts: 4
Joined: Fri Aug 04, 2017 5:10 am

Multibody: my shape is ill rotated after 1st timestep

Post by alexp »

I try to implement the ant usecase (http://www.bulletphysics.org/Bullet/php ... =9&t=11818), which was originally based on rigid bodies.

As simple example, suppose to have a spehre, and a capsule shape (leg) horicontally pointing away from the sphere (aligned along the x-axis)
I create the shape (which is initially aligned along Y per construction), form the multibody, add the revolute constraint, create the collision shape, rotate is. (following e.g. the example https://github.com/bulletphysics/bullet ... ontrol.cpp).

My problem is now, that initially (before executing any stepSimulation), everything looks as expected (the leg oricontally).
But right after the 1st timestep, the leg is aligned along the y-axis - like the original shape right after creation, before rotation.
The revolute in principle works well (it acts on the COM); only the shape is displayed rotated (around the COM) from alongx to along-y.

The examples circumvent this problem, as they use boxes which can be created with the long side along x instead along y in the corresponding examples (e.g. constraint feedback, where the pendulum is oriented horicontally).

For the capsule shape, I could not find a possibility to create it such, that is aling with the long side along x - how to do that?

Alex
Post Reply