My actual shape objects collide poorly. How do I fix this?
My actual shape objects collide poorly. How do I fix this?
This is a common problem but is very easily fixed. There are three factors which influence how well an actual shape collides with other objects: the actual shape detail, the resolution of the input geometry, and the number of simulation substeps.
The level of detail (which can be "low", "medium", "high", and the aptly-named "coffee break") determines how detailed the actual shape collision data that physX creates will be. To illustrate, consider a model of a tree. The "low" detail setting might capture the large-scale shape of the tree: the trunk, large branches and the canopy. "Medium" might have more detail, down to smaller twigs and clusters of leaves, while the "high" detail setting might capture individual leaves. Conversely, using "medium" and "high" levels of detail on a plain cube would do little: cubes and grids are smooth and featureless. In general, you will not need to change this value: "low" detail is sufficient for most applications.
Another cause of bad collisions with actual shape objects is that your input geometry may not have sufficient resolution. In general, actual shape collisions behave better with higher resolution geometry; the more triangles it has to work with, the more robust the collision data will be. Also take care that the size of individual triangles on different actual shape objects are (very roughly) the same size. For example, a very small sphere may pass right through a very large grid made of only two triangles.
Finally, increasing the simulation substeps sometimes fixes simulation problems with actual shape objects. By taking more simulation steps per frame, collision calculations (of all types) will become more accurate and collisions will become slightly stiffer.

