Search Unity

[FIXED] Raycast on a non-convex mesh collider acting weird

Discussion in 'Physics' started by S4UC1SS0N, Aug 18, 2016.

  1. S4UC1SS0N

    S4UC1SS0N

    Joined:
    May 29, 2014
    Posts:
    49
    I'm experiencing a very weird behavior while raycasting.
    I created a few meshes with blender and on some parts of them, my raycast hit something near the mesh collider but not exactly at the collider.

    At the middle of the video (when i look up at the sky) i turned on the "convex" mod on the mesh collider, and the problem stoped. Of course it's not a solution because a lot of my meshes collider must be non-convex.

    And a screenshot of the editor where i add a debug point at every hit point position :


    here is few other examples (the left part of the mesh is "clean" because i turn on convex before raycasting this part of the mesh) :

    http://i.imgur.com/DgazqqI.png

    Anyone have any idea of what might be going on ?
     
    Last edited: Aug 23, 2021
  2. S4UC1SS0N

    S4UC1SS0N

    Joined:
    May 29, 2014
    Posts:
    49