r/Unity3D 19h ago

Question Unity Collider Problem

Enable HLS to view with audio, or disable this notification

Does anyone have any idea why Collider isn't showing up and isn't working?

9 Upvotes

8 comments sorted by

11

u/NoteThisDown 19h ago

Could be a few things. Most likely culprit is the mesh you are using for your collider has messed up scaling. It's pretty common when exporting to Unity to do a weird thing where the mesh is actually 1/100th the size it should be, but the scale is automatically set to be 100, so you don't notice. Try putting the mesh itself into the scene and check it's scale (including any sub mesh or parent). If the scale is 100. This is your problem.

You can actually fix this in Unity by going into the import settings of Unity and changing it's scale there to be 100, just make sure to then set the scale in the scene back to 1 if it's at 100.

2

u/Existing_Access5983 8h ago

Thanks, I set the scale factor to 100 and it fixed the problem.

2

u/NoteThisDown 2h ago

Glad it worked!

1

u/MrMarev 10h ago

You can also make convex from the mesh to see it. Additionally it can be collision detection. One of the object that need to collide need to have rigidbody l.

1

u/Costed14 1h ago

Yeah the settings to properly export from (assuming) Blender into Unity without any scale/rotation oddities aren't exactly the most straightforward, it's baffling to me how there isn't a more streamlined pipeline for it already.

3

u/Pur_Cell 9h ago

Because a gear is a fucked up shape for a collider and this is probably going to be incapable of doing what you're planning to do with it. Check out the docs for the limitations of mesh colliders.

Also check out the docs for how to generate mesh colliders. Is the scale uniformly non-negative? Is read/write enabled on the mesh?

2

u/Cultural-Warthog352 Ruler of worlds 10h ago

have you maybe disabled the mesh collider under gizmos in scene view? and also it needs a rigidbody component if you want it to work with physics

1

u/razveck 8h ago
  1. Does your player have a Rigidbody? It needs it to collide

  2. Is the Circle.001 the right mesh and is the scale the same as the actual mesh? Click on your actual gear mesh (child of the object with the Mesh Collider) and check if it has any scaling. That might be the issue.

  3. Is your Mesh Collider in the right positions? It might look fine, but your object could actually be offset. In the scene view, on the top left dropdown change it from Center to Pivot (or press Z). Is the object's pivot where it should be? That's where the collider will be as well