Raycast does not hit mesh collider

I am using raycast to hit a mesh collider and it just hit when has active the convex option, which is not useful as i need it without that.

1 Like

I’m also experiencing the same problem. The ray is not detecting a hit on imported planes or meshes that are single sided (other imported meshes are fine). I have tried with different variations on the model import settings, including generate collides. What’s strange is collision are detected with these objects, just not the rays hit.

Using Unity 5.2.0f3
Maya 2015

Solution:

Okay I figured out the problem. It’s being caused by the up scaling of the mesh (single sided or a plane). For example, if you have imported a mesh, placed it in the scene, then up scaled it a significant amount, the problem is created. If you delete the mesh from the hierarchy, go back to the imported mesh in the project folder, increase its scale there (in the import settings). Upon placing it back in the scene it should now respond to ray hits.
Not sure if this is a bug or a known issue, but this seems to solve it.

What are you trying to import? if it is a terrain generated by sculpting a plane object, then don’t use plane. My simple method is using a cube object, delete all its faces except for the top one, subdivide the top face, and begin sculpting. So all terrains i’ve generated so far has two sides unlike a plane which only has one side (invinsible from the other side). Raycast hit wont cooperate with single sided object.
Hope this will help.