Dynamically skipping collision response.
Posted: Mon Nov 26, 2018 4:11 am
I am using gContactProcessedCallback so that I can control the collision response, on the fly.
This works well so far (I use it to implement a more complex friction behaviour.)
However, in some cases, I want dynamically have the option to decide to have no contact response.
What I tried was have my gContactProcessedCallback return false instead of true.
But its return value is not used in btCollisionDispatcher.cpp, I determined.
I also tried setting cp.m_appliedImpulse to zero, but that wont stop the response either.
Is there a way negate the collision response?
Because I don't know in advance whether the response is req'd or not, I can't use my current filter mechanism of setting group/mask of the bodies.
For a certain group pair, I want sometimes a response, but sometimes no response, based on complex run-time criteria.
thx
This works well so far (I use it to implement a more complex friction behaviour.)
However, in some cases, I want dynamically have the option to decide to have no contact response.
What I tried was have my gContactProcessedCallback return false instead of true.
But its return value is not used in btCollisionDispatcher.cpp, I determined.
I also tried setting cp.m_appliedImpulse to zero, but that wont stop the response either.
Is there a way negate the collision response?
Because I don't know in advance whether the response is req'd or not, I can't use my current filter mechanism of setting group/mask of the bodies.
For a certain group pair, I want sometimes a response, but sometimes no response, based on complex run-time criteria.
thx