Hi,
I've integrated Bullet into numerous small projects and utilised static, kinematic and dynamic objects to good effect. A recent major refactor has resulted in odd behaviour for dynamic objects and I'm hoping for suggestions on where to look for a bug in my code.
Essentially my dynamic object position updates are working fine but no rotations are being applied.
I'm using the btDefaultMotionState and the basis is not being updated by Bullet after each simulation step, while the origin is updating as expected.
Any pointers as to where I should look for the bug?
I'm avoiding pasting code at this stage as general areas for investigation are what I'm after.
Any help much appreciated.
Cheers.
Dynamic object transform basis not updating [SOLVED]
-
- Posts: 20
- Joined: Sat Jun 04, 2016 10:34 pm
- Location: Edinburgh
Dynamic object transform basis not updating [SOLVED]
Last edited by Octavius_Ace on Sun Jun 05, 2016 2:39 pm, edited 1 time in total.
-
- Posts: 849
- Joined: Tue Sep 30, 2014 6:03 pm
- Location: San Francisco
Re: Dynamic object transform basis not updating
My guess is that the inertia tensors are not being properly computed. If you supply a zero inertia tensor then the object will not rotate (it behaves as if it had infinite rotational mass). Maybe look at the bottom of this forum thread.
-
- Posts: 20
- Joined: Sat Jun 04, 2016 10:34 pm
- Location: Edinburgh
Re: Dynamic object transform basis not updating [SOLVED]
Bingo! That solved it. Thanks very much.drleviathan wrote:My guess is that the inertia tensors are not being properly computed. If you supply a zero inertia tensor then the object will not rotate (it behaves as if it had infinite rotational mass). Maybe look at the bottom of this forum thread.
Turned out I was setting the local inertia correctly at first and later setting it back to (0,0,0) in a misplaced line of code.