Using PhysX Contact Modifiers

This is wonderful. After playing with the other post I stumbled upon (perhaps more, I can’t remember how many things I’ve dug through), I think I have something remotely similar. However your example seems to be a lot closer to exactly what I need.

You mention that Contact Modifiers are global, affecting the entire physics scene and not specific bodies. The PhysX docs here says you can “exempt certain pairs of objects from interacting, or to configure the SDK collision detection behavior in a particular way for an interacting pair”. It seems your code is using collision channels as a broad way to tell if it’s a vehicle/landscape interaction. I think that might work for what I’m doing, but how does what you’re doing differ from the docs, or does it?

Finally, what files are you putting these in? For me, the first two chunks of code are in a custom World Settings as used here. Where would I put the startup module?

Thank you. This gives me a few things to test with.