Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Raycast not working after upgrading to Unity5

Discussion in 'Editor & General Support' started by vegenarie, Mar 5, 2015.

  1. vegenarie

    vegenarie

    Joined:
    Jan 5, 2011
    Posts:
    287
    My raycast worked perfectly until i upgraded to Unity5, i tried to use it without layermask and it is hitting some objets but not others with mesh collider i have, i have used debug.drawline and the line goes exactly as should but the raycast is ignoring the collider through which the line goes. Seems some problem with the layermask, but checked it is the right one
     
  2. vegenarie

    vegenarie

    Joined:
    Jan 5, 2011
    Posts:
    287
    It seems to be the model, i see unity5 does not show the collider in the scene and i tried just changing to a different collider and the raycast works, just doesn't work with my model, but with previous versions it worked. I even tried to flip the normals in the model but it doesnt work either, though with normals flipped the collider is shown in the editor though the raycast doesnt work either. I tried changing all the import options and it doesnt work, any ideas why is this? seems to be a bug