1
\$\begingroup\$

I'm trying to add collider to the 3D scene. I have added mesh collider to the floor but I see the character is still floating up when I play.

How can I edit this collider. I don't see any edit collider option here(like we see in case of box collider & other one's)

Question has been updated with further details:

The floor is not perfectly plane. It's raised from some place and down from other. So, I don't see any problem with character properties. The problem with mesh collider is that it tries to join lower & upper parts of plain with a straight line. It doesn't exactly take the size of plane

enter image description here enter image description here

\$\endgroup\$
3
  • 1
    \$\begingroup\$ I don't think it's a problem with your collider, but just a character behaviour. Look at the character components, if there're any options related to the ground/collisions/movement. Or try to just move the character down so it touches the ground and see what happens. \$\endgroup\$
    – kolenda
    Apr 21, 2017 at 14:51
  • \$\begingroup\$ @kolenda i have updated my question \$\endgroup\$ Apr 22, 2017 at 19:21
  • \$\begingroup\$ Can you show us the inspector for the MeshCollider? It would be helpful to check whether it's convex (this fills in the valleys - not what you want) and static (some collision behaviours are supported on non-convex MeshColliders only if they're static) \$\endgroup\$
    – DMGregory
    Apr 22, 2017 at 23:12

1 Answer 1

0
\$\begingroup\$

it tries to join lower & upper parts of plain with a straight line. It doesn't exactly take the size of plane

Your plane mesh is "open" so when you import it into Unity to use as a collider (that's what a mesh collider does: it takes the mesh already being used for rendering and converts it to a collision mesh) it has to guess how best to close it.

You need to make a second model to use for collision that is a closed mesh. Just close up the geometry in whatever program you created it in, export it and import it as a new asset, and assign it to the mesh collider component.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .