I have a "kinematic camera", i.e. a no-mass btRigidBody set up like this:
Code: Select all
btKinematicCamera_->setCollisionFlags(btKinematicCamera_->getCollisionFlags() | btCollisionObject::CF_KINEMATIC_OBJECT);
[... and at every step: ...]
btKinematicCamera_->setWorldTransform(btTransform { to_bt(camera_.orientation()), to_bt(camera_.eyePosition()) });
When I bump the camera into the rigid bodies which are still moving, they move out of the way. Great. This is what I want.
But, at some point, some of the dynamic bodies reach a speed low enough for Bullet to assume they can be deactivated (as far as I understand).
And they don't collide with the camera (kinematic body) anymore. They remain inactive.
Is there something I can do to make the collision with a kinematic body wake them up?
Am I doing something wrong?
I've tried to use
Code: Select all
btRigidBody_.forceActivationState(DISABLE_DEACTIVATION);
Thanks in advance.
EDIT: typos: Kinetic => Kinematic