r/tabletopsimulator • • Mar 21 '23

Questions Unity Mesh Colliders Issues

I'm having trouble with a custom asset bundle I created in Blender, then exported to Unity and from there obviously to TTS. It's a tower room with a floor and walls, basically cup-shaped, so it needs a custom collider. I've used those before, but with this particular object, it falls through the table. Every. Single. Time. I've tried everything I can think of, simplified the collider mesh, re-created my custom object from scratch, experimented with the hierarchy, but I cannot get it to work. When I imported only the object I used for a simplified collider mesh (as a test), it stayed put, but once I pair that collider with my actual game object and export it from Unity that way, whoosh, free fall.

I feel like maybe I'm missing something super obvious. All my Blender and Unity knowledge is cobbled together from random tutorials, so it's very patchy. I'd be grateful for any advice or troubleshooting suggestions. I have created and exported asset bundles without issues before, including some with mesh colliders, so it does generally work fine for me, but this particular project just will not cooperate and I'm ready to tear my hair out.

Thanks in advance.

5 Upvotes

4 comments sorted by

1

u/larriecorvell Mar 21 '23

What custom collider do you use? Did you use object group (of primitives)? You might want to show your collider and its structure. Also, Convex Mesh Colliders in Unity are limited to 255 triangles.

1

u/AddictedGuineaPig Mar 21 '23

Thank you. Yes, I can grab a screenshot of my collider in a moment. It's not convex, though - it's for a static object that needs things to go inside of it (basically a room you could drop figurines/furniture or whatever in), so from what I understand, it needs to be concave, basically a hollow cylinder with a floor that's open on top. I just need it to sit on the table and I need figurines to *not* go through the floor/walls.

I hope that makes sense. Let me know if I am somehow getting this completely wrong.

1

u/larriecorvell Mar 22 '23 edited Mar 22 '23

From your screenshot, it seems like your collider is still one single non-convex mesh (which can be used as a non-convex collider in TTS Custom Model if you mark it as non-convex but the object must be static/locked for it to work, otherwise it would be considered as a solid cylindrical object).

You have to create a bottom and an array of sides separately, similar to this example (I have seen a thread in the Unity forum discussing this topic and showing examples, but I can't find it again).

Then export them as an object group (so that it is considered as one mesh in Unity). Import to Unity and select it as the custom collider for your room object.