I’m testing RealityKit cloth for garment-like cloth over an authored human-shaped triangle-mesh collider. The issue also occurs with a static collider, so it does not appear to depend on character animation.. Contact is stable and runs interactively, but I cannot achieve close surface contact without sacrificing robustness. The cloth mid-surface remains visibly several millimetres from the authored collider, especially around curved or narrow areas such as the head, arms, and hands. Transparent rendering of visualMesh confirms this is not just render thickness. Reducing ClothMeshShape.bias reduces the gap, but eventually causes interpenetration around difficult geometry. Increasing it prevents penetration but makes the cloth visibly float. I’ve also checked scale, winding, normals, reasonably even triangles, timestep, and solver iterations. I want to avoid inflating the collider or adding anatomical proxy shapes. Is bias the only physical-clearance control, or does RealityKit apply an additional contact radius derived from simulation-mesh resolution? Is local conforming refinement the recommended way to achieve roughly 1–2 mm clearance while retaining robust real-time contact? Are there any specific topology requirements beyond evenly sized triangles? I can provide a minimal reproduction and screenshots if helpful although not sure I can share screenshots here?
RealityKit cloth: reducing mesh collider air gap without penetration
Hi @rfsfrgthefrefet,
Bias is the most straightforward control for the contact distance. If that is not enough, the contact distance could be decreased by increasing the resolution of the physics (or proxy) mesh, still keeping evenly sized triangles. The resolution of the visual mesh will likely have to be increased accordingly.
Decreasing the size of the triangles would allow the cloth mesh to adjust better to the narrower areas. Perhaps disabling self collision may help as well because the cloth has a certain implicit thickness depending on the resolution of the physics mesh, which has an effect only when self-colliding. The higher the resolution, the smaller the self-collision thickness.
Note, however, that raising the resolution would lead to a larger cost in terms of computation time and power consumption. Additionally, the cloth will also be more prone to self-entanglement. So one should pick the resolution that best balances these tradeoffs for their specific use case, without introducing errors.
The evenly sized triangles is a requirement that should be maintained to keep collision detection fast. So, local conforming or refinement would not help because the triangles should be kept at even size globally. Topology, however, can be modified as long as the mesh is kept manifold.
Hope this helps! If you could share a minimal repro project and/or screenshots, we'd be glad to take a look.
thanks but this didnt work, I have prepared a mini repo but how can I share this with you privately?
Hi @rfsfrgthefrefet,
To share your project with us privately, you can file a report with Feedback Assistant and attach the project there. Once you file the report, please post the FB number here so we can take a look!
If you're not familiar with how to file feedback, I also recommend reading through Bug Reporting: How and Why?
Thanks!