Torus Collider doesnt match shape at all

Avatar
  • updated
  • Not a bug

Enable unity physics debugger

create a torus component play with its radius and thickness, note that the collision does not match the drawn object

It appears to use a fixed torus mesh rather than a mesh computed to match the torussettings.

Reporting a bug? please specify Unity version:
2022.1.8f1
Reporting a bug? please specify Shapes version:
4.1.3
Reporting a bug? please specify Render Pipeline:
HDRP
Avatar
Freya Holmér creator
  • Not a bug

Shapes doesn't have any special handing of colliders, it's a rendering library. Colliders will have to be handled separately!

What is happening (I'm guessing, since "torus collider" isn't a component unity has) is that Unity's mesh colliders will by default use the mesh attached to the renderer, which isn't made to be used as a collider, as it contains a lot of special data that enables Shapes to make use of instancing the way it does