It looks like for static objects "setWorldTransform" always carry Identity matrix in "worldTrans".
Now I can not move my static object. In prev. version all was OK......
Jack wrote:It looks like for static objects "setWorldTransform" always carry Identity matrix in "worldTrans".
Now I can not move my static object. In prev. version all was OK......
You should use 'kinematic' for moving static objects. See the CcdPhysicsDemo for an example, search for 'kinematic in that demo. Are you using btMotionState?
Things have changed/improved, but perhaps there is an issue. Don't worry, if you can show me (by private message) what is wrong, we'll fix it.
SteveBaker wrote:I just did a checkout from SVN - and the 'trunk' version is missing a file LinearMath/btQuickProf.h:
No files missing: it was a typo in DemoApplication.h, QuickProf.h -> Quickprof.h
I'm surprised that my Mac OS X build just worked fine?!
It has been fixed in SVN. I'm on travel, and the hotel connection doesn't let me upload a new version of bullet-2.17.tgz, so it will be done early next week,
The recent Bullet development on synchronizing the motion state has some issues which will be fixed in the next release: for kinematic/static objects, the 'setWorldTransform' should not be called, only dynamic rigid bodies need this callback.
As a temporary workaround for static/kinematic objects, please call 'setCenterOfMassTransform' on the btRigidBody object, instead of setting m_worldTransform member directly.
SteveBaker wrote:I just did a checkout from SVN - and the 'trunk' version is missing a file LinearMath/btQuickProf.h:
No files missing: it was a typo in DemoApplication.h, QuickProf.h -> Quickprof.h
I'm surprised that my Mac OS X build just worked fine?!
It has been fixed in SVN. I'm on travel, and the hotel connection doesn't let me upload a new version of bullet-2.17.tgz, so it will be done early next week,
OK - I can fix it now that I have SVN commit privs.
I think some OS's do not check for case-sensitivity in filenames...this might explain why it works in MacOS but not Linux.
I also found that if two static objects overlap each other then ASSERT(m_Adiag > 0.0f); in btJacobianEntry::btJacobianEntry occurs....
Very annoying in DEBUG builds. However RELEASE builds work OK.
Jack wrote:I also found that if two static objects overlap each other then ASSERT(m_Adiag > 0.0f); in btJacobianEntry::btJacobianEntry occurs....
Very annoying in DEBUG builds. However RELEASE builds work OK.
This assert should never trigger, there is no purpose in trying to solve velocities between static/kinematic objects. By default there should be no collision detection and/or constraint solving between static and kinematic (animated) objects. Are you applying proper collision filtering flags? Can you send me some snippet (using PrivateMessage) so I can reproduce this in a Bullet demo?
Issues with static objects have been fixed in Bullet 2.18a.
Make sure you use btMotionState, to synchronize world transform between physics/graphics (see latest Bullet Demos). Also use the btDiscreteDynamicsWorld::addRigidBody, to add rigid bodies to the world. This automatically updates the collision filter flags, to avoid static-static collision detection.
btDiscreteDynamicsWorld::addRigidBody sets gravity. Strange situation occurs. I set object gravity to zero (in constructor), then call addRigidBody. addRigidBody overwrites my gravity...
If I remove object, then add it back, addRigidBody overwrites gravity. Odd behaviour....
Jack wrote:btDiscreteDynamicsWorld::addRigidBody sets gravity. Strange situation occurs. I set object gravity to zero (in constructor), then call addRigidBody. addRigidBody overwrites my gravity...
If I remove object, then add it back, addRigidBody overwrites gravity. Odd behaviour....
This is intended and expected behavior, and will be clearly documented in the upcoming Bullet documentation.
Whenever you call 'setGravity' on the btDynamicsWorld, all rigidbodies that are currently added to this world will get this new gravity. And if you add a new rigid body to the world, it gets the gravity that is acting in that world. The only way you can have per-object gravity is to set its gravity AFTER you added it to the world. Also don't call 'setGravity' on the world, because it will overwrite all current gravity.