Hello, I'm trying to use needBroadphaseCollision to filter collision between moveable objects and player. It works pretty well but there is one problem.
The idea is simple: If an object is still or does not move faster that a threshold, ignore collision with players physical body. In this case I use my own code to update player. If the speed of this object breaks that threshold, convert player to rag-doll and let Bullet do the update.
I'm using my own custom character controller as i couldn't use Bullets. My player is a ragdoll with btRigidBody bodyparts where linear and angular factors are set to 0 and these limbs are updated based on model animation as long as the player has control over their character. As soon as collision with a fast moving object happens, player loses control over their character, linear an angular factors are set to 1 and i let Bullet handle the ragdoll physics.
It works well for most objects but i have an object that uses btCompoundShape for its body. When this object is still, (it didn't move for a while) it works.
However when this object starts to move and doesn't break the speed threshold, it gets affected by players physical body (player starts to push this object around).
I added some debug variables and it seems that even when needBroadphaseCollision returns false, there are still contact points generated between player and this object.
What am i missing?
↧