So I’m working on 2D Platformer, but the stages will be 3D Models. As a test, I used a premade model, applied a Box Collider 2D to it, and everything worked fine. Then I made my own model in Blender to replace the premade model, when I tried to apply the Box Collider 2D to it, I got an error saying “The collider did not create any collision shapes as they all failed verification…” I tried to ignore it and continue setting things up, but when I tried to test it, my player just fell through everything. I’m not sure what to do now. Can someone help me?
Note: I am relatively new to using both Unity and Blender so I have very little idea as to what I’m doing.
Edit: Thank you for the pointers, I got it working!
This is a common trip-up: when you import something form Blender it comes in (usually) with rotation of (-90,0,0) to handle coordinate transforms from Blender to Unity.
When you slap any 2D collider on that, the collider is now “lying flat” and generates no shapes.
To get around this, use an extra GameObject at the root, put your 2D collider on that, then “hang” the Blender3D object as a child of that, and make the prefab from the root.
Here’s some more notes:
Costs of using Blender files directly vs exporting to FBX:
Unity imports Blender3D objects as FBX via a little Python script:
The Python script that Unity uses (substitute your Unity version number or search) to import:
Blender3D objects used as trees / detail in Unity3D terrain (See the second half of this response)
Probuilder and Probuilderize and Blender:
Some more potentially-useful info:
Updating Blender files without breaking your prefabs:
When I work in Blender3D for Unity3D use, I follow these organizational rules:
use Empty Blender Objects as folders: they come out as an extra GameObject
ALWAYS parent everything to a single Empty, even a single object
put as few objects in a given .blend file as possible, combining them in Unity into a prefab
REMOVE unnecessary items (Light, Camera, etc.)
use good names for your Blender3D objects and NEVER RENAME them after Unity sees them
don’t even think about final Materials or Textures in Blender. Set the mesh to use N different materials, but always set up the materials within Unity and disregard what gets imported.
Okay, it says “This could be because they were deemed too small or the verticies were too close. Verticies can also become close under certain rotations or very small scaling.” I didn’t resize the model at all and I only rotated it 180 degrees so it would face the camera. I don’t understand what it means by too small or close.
You cannot rotate 2D colliders in 3D space. Well you can but the geometry (vertices) of the collider shapes always exist in 2D space (XY plane). If you rotate a 2D Box around the X or Y axis then you can create shapes in XY that are edge-on or just too small.
You can see this as the gizmo will show nothing and the shape-count is likely zero (shown in the Collider > Info in the inspector.
You said you rotated it by 180 but that doesn’t sound correct as doing that in the X or Y won’t cause this.
I’d say check your hierarchy and look at the gizmo.
Do this with an empty GameObject with a BoxCollider2D and then manually rotate the X or Y to see what happens. You’ll see that at close to +/-90 on the X or Y then the collider is effectively edge-on so in the XY plane (it’s 2D physics!) it won’t exist.
You certainly shouldn’t be doing this in runtime as the only thing that can move is the Rigidbody2D which has three degrees of freedom: XY position and Z rotation. Colliders are attached to Rigidbody2D.