Unity3D - Ignore a "Collider Layer" for "Flex"

Hello,

Would be glad if anyone could show a way to force nVidia Flex to interact with specific object layers in Unity3D.

Regrds.

I found a way to specify the layer of the object that searches and detects all of the colliders:
In the Create method of _auxFlexDetectShapes (line 172), set the layer to a newly defined one, for example named “Flex”.

...
m_trigger = GetComponent<BoxCollider>(); // Existing code
m_trigger.isTrigger = true; // Existing code
gameObject.layer = LayerMask.NameToLayer("Flex"); // Added line

Then in the project settings, physics, you can set up the layer collision mask to specify which layers should interact with the Flex particles.

1 Like