Unity mesh collider incorrect position
Hi, I'm currently learning on importing a 3D model (.fbx)
I've added the mesh collider and tick the "convex" box. The player collides, but not the collision detection. The mesh collider's position is above the 3D object.. here's the image..
how to make its position the same as my model????
Do you have non-uniform scaling on any of your meshes? That can sometimes cause problems like this.
umm... what do u mean by "non-uniform scaling" ?? sorry, still a newbie here
Hey namdaemun, did you work this out?
I have exactly the same problem. I am working with Blender 2.6 and everything is uniformly scaled as mentioned by syclamoth (x,y,z all scaled the same in Unity ;))
$$anonymous$$y mesh collider has almost the same rotation and position as the object , it is just higher on the y axis. I searched for a bit and had some luck moving the mesh collider by changing the origin on my model within Blender (really don't want to do that) however even still could never get it spot on in Unity.
Let me know if you fixed it, otherwise anyone else have any ideas?
I cant remember what I did exactly the last time something like this was happening to me (on Blender also), but my mesh collider was completely reversed from the mesh... All I remember doing to fix it was tweaking the values in blender on the left side of the export screen and re-exporting it a couple of times, and then it came out right.
Answer by Ayelis · Sep 19, 2012 at 08:16 PM
Apply the Mesh Collider to the actual Mesh instead of the entire object. That should fix the problem. (And that goes for all of you! And anyone who has this issue in the future!)
If your collider is oriented improperly, offset, scaled too large or small, or doesn't exactly match your mesh (and you can check that most of the time by ticking off "Concave/Convex"), then it's likely that you have the mesh applied to the wrong part of the object.
Worked! I was importing Sketchup 2018 files natively (NOT 2019, save them as 2018) and applying the mesh collider to the parent. Expanding it and adding it to what was default named "$$anonymous$$esh Group 1", it works great.
Answer by zizocg · Oct 13, 2013 at 11:12 PM
I just had the same problem and I found out that I need to put the pivot point of both meshes in the same coordinates. Just put them on 0.0.0 x.y.z, that way you won't be confused. I used Cinema 4D.
Answer by Gurekam-Dhillon · Mar 26, 2016 at 06:40 PM
Make an empty game object and parent it to the model, add the mess renderer to the empty then select the mess, move and orient the empty to match the model.
Answer by $$anonymous$$ · Feb 17, 2015 at 03:00 AM
Ok, so I did what Ayelis said, because the problem I had was that it was rotated 90 degrees to what it was suppose to be. And when I did what Ayelis said, it fixed it, but then it was too low. So then I duplicated the object with the mesh, removed everything from that duplicate, except for the mesh collier, and then moved that up so that it matched the model, and that fixed the problem. Hope this helps!
Answer by Alexyousee · Dec 24, 2016 at 11:41 PM
In Blender, position the Mesh Collider object over your Model object so the physics lines up correctly then select both objects and apply Location (central A -> Location). Now they have both got the same location export them (I used .dae) and add the Mesh collider in Unity - worked perfectly for me!
And for rotation issue see this link