Hello. I’m making a game that uses 3D models, but to increase performance I planned on using 2D physics. However, when I try to add a BoxCollider 2D it doesn’t show up in the scene, and I get the error “The collider did not create a collision shape as it failed verification. This could be because it was deemed too small or its vertices were too close. Vertices can also become close under certain rotations.”
I tried making my model bigger, but that didn’t solve the issue. Do I have to use 3D physics for 3D objects?
[edit] I’ve found a really hacky work around. If use 3DSMax to render a png of the model, then attach a sprite-render to the object, create the 2d physics polygon, then delete the sprite-render I get the desired results. Surely there is a better way of doing this?
[edit2] I found the reason this is happening. When applying a BoxCollder2D to a 3D object, unity seems to take a flattened image of the object from the Z plane (that is to say, with Y being vertical and X being horizontal) but I was rotating my objects by 90 degrees, making that plate on which it’s trying to make the collision box flat:
(worked on the left, error on the right)
I’m still not sure how to fix this, but at least I have something to work from now. I guess I could open the models in 3D studio and rotate them there, then export them again.