- Home /
Linecast ignoring mesh collider
Hey I have a script that is using linecast to do ground detection. However for some reason linecast is not counting the mesh collider for my enviroment. It will detect simple cube and other colliders but not the mesh collider.
Answer by Cherno · Jan 06, 2015 at 02:16 PM
It might have to do with the mesh collider's normals. If they point away from the origin of your Linecast, it won't register (the Linecast won't hit the non-existent "backside" of the collison mesh's polygons). Also, try changing the mesh collider's Convex setting to true and false for testing purposes.
Cherno you hit the nail right on the head buddy! $$anonymous$$y normals well fine but my linecast was actually reversed! You pointed me in the right direction. +1 Rep or whatever we do here. It detected the cube because it was actually detecting the bottom of the cube.