- Home /
 
 
               Question by 
               Riverm4n · Apr 18, 2017 at 09:06 AM · 
                collisionblenderraycastingexport  
              
 
              problem with raycasts and imported mesh
I cant get raycasting to work on an imported mesh. Theres a dip in the mesh (lake) and the raycast seems to treat the whole ground plane like a big cube. The character rigid body falls in just fine but the raycast just stops on the surface of the lake. Any ideas?
Ive tried chaniging import settings all the ways I can think of. I tried having unity calculate normals and generate collision mesh data but no change.
Thisis generating the raycast and debug rays:
     if (Physics.Raycast(transform.position, -transform.up, out hit)) {
         Debug.DrawRay(transform.position + -(transform.up * 0.1f), -transform.up, Color.magenta);
         print(hit.normal);
         Debug.DrawRay(hit.point, Vector3.forward, Color.green);
     }
 
               
                 
                raycast.jpg 
                (124.1 kB) 
               
 
              
               Comment
              
 
               
              Your answer