Hello!
In my scene, I have a big cube with a null mass (so it is static?) and cubes laying on it with a non null mass (so they are dynamics?).
My first try failed: I was doing UpdateSingleAabb on every RigidBody before every stepSimulation (I know it is not good for performances, it was just for the test). When I moved the big cube, the others stay in the air, as if they were still on the big cube. When I moved a small cube in the air, it did not fall.
My second try was successfull. I made the big cube as a kinematic objet with
Code: Select all
rb->setCollisionFlags(rb->getCollisionFlags() | btCollisionObject::CF_KINEMATIC_OBJECT);
rb->setActivationState(DISABLE_DEACTIVATION);
as describes in
http://www.bulletphysics.org/Bullet/php ... f=9&t=3382
When I moved the big cube, the small cubes felt
I have some questions left:
- is it the good way to make a kinematic object?
- Do I have to change the speed of the kinematic objects in order to have realistic collisions? Do I have to change something else?
- what are static and kinematic objets? bullet does not make them moving, but they collide with other objects? Bullet reads the position from the motionState of the kinematics, but not the one of the static?
- what is rb->setActivationState(DISABLE_DEACTIVATION); for?
- why is UpdateSingleAabb not working? is something wrong in my code?
- how can i move dynamics objets? (the one with a non null mass)
Thank you for your answers!!!