The 'basic' recipe, as I was able to deduct is basically this:
- Create the btMultibody instance
- Create the joints (in my case all joints are revolute joints)
- Call 'finalizeMultiDof' on the multibody
- Create the colliders for each link (^1)
- Call 'forwardKinematics' and 'updateColllisionObjectWorldTransforms' with the results from 'updateCollisionObjectWorldTransforms'
- Add the multibody and its colliders to the world
- Create all render objects and sync the render objects position with the collider (which I cached from previous step) position
However, according to my own worktime tracker, I've spent ~90 hours trying to dismember and comprehend the example and get it to work with my very limited case, without luck.
I've verified, that all values passed to 'setupRevolute' are the same, also all values passed to 'setWorldTransform' when creating the collision shape match with the values in the example. Yet, I cannot get it to work.
So, I guess, my questions are:
- Is my overall procedure correct?
- Regarding (^1) is it mandatory to use btCompoundShape for these kind of applications? I will try it now, but didn't yet.