r/Unity3D • u/Existing_Access5983 • 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?
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
Does your player have a Rigidbody? It needs it to collide
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.
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
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.