needBroadphaseCollision - need better explanation
Posted: Sat Dec 16, 2017 9:46 am
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.
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?
Also this appears to happen when the arguments in needBroadphaseCollision(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) are:
proxy0 - player, proxy1 - object
It does not happen when:
proxy0 - object, proxy1 - player
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.
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?
Also this appears to happen when the arguments in needBroadphaseCollision(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) are:
proxy0 - player, proxy1 - object
It does not happen when:
proxy0 - object, proxy1 - player