Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Don't miss out on the Unite LA Keynote for the latest information from Unity! Set a reminder!
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Raycast error starting from 2018.1.5

Discussion in 'Physics' started by Eidoboy, Jul 20, 2018.

  1. Eidoboy

    Eidoboy

    Joined:
    Jul 3, 2012
    Posts:
    21
    In my application I have some procedurally generated building with separated faces with MeshColliders. I then use a Raycast with a ray coming from the Camera (ScreenPointToRay) to detect the collision with the faces and move and parent some GameObjects on the faces. Everything was fine until 2018.2 upgrade, where I start getting some weird behaviour in hitting the right building face. After testing the latest versions, I found out that this problem starts from Unity 2018.1.5. Is something changed on Raycast starting from that version? Many thanks
     
  2. Eidoboy

    Eidoboy

    Joined:
    Jul 3, 2012
    Posts:
    21
    I'm reviving my thread since I had time to do some testing. It seems that the issue is caused by the parenting of the procedutal generated faces in the building hierarchy.
    By disabling and enabling the parent building, the meshcolliders get refreshed and everything starts to work again
    Problem verified up to Unity 2018.2.2 now
    Thanks