I have a scene with a reasonably complex collision filtering system. At the time the scene is created the exact required behavior of the filtering system is not known (It is known before the first tick). As such I need a way to alter the behavior of the collision filter after scene creation. I had two ideas as to how to do this:
- Pass in a new collision filter replacing the old one.
- Update the constant filter data block for the scene to tell the filter how to act.
However as far as I can tell once the scene is created it’s not possible to set the filter shader and it’s not possible to change the filter data block (You can only access a const pointer to it).
Am I overlooking a method which allows me to do one of these two things? Is there some alternative way I can dynamically alter the filter behavior?
I’m currently using 3.2.0 but I’d be interested in solutions for later versions (that don’t involve modifying physx source) as well.