Search Issue Tracker

Fixed in Unity 5.5.0

Votes

31

Found in

5.0.1f1

Issue ID

699563

Regression

Yes

RaycastHit returns the wrong triangle index in Unity 5

Physics

-

-

Priority: 3Not yet prioritized for a release

-

Severity: 2Core functionality majorly impacted

Steps to reproduce:
1. Open attached project's "TriangleBug" scene with 4.6 version of Unity.
2. Enter play mode. (have both scene ang game views visible)
3. Point mouse to the track - in scene view triangle gets highlighted.
4. Repeat steps 1-3 with 5.0 - incorrect triangle gets highlighted.

Comments (9)

  1. F37486aa820431f7781e942b95b2355c?d=mm

    panta

    Jun 20, 2016 02:28

    I'm hitting this in Unity 5.3.2f1 still - is there a fix in the works? It really hurts not being able to use TriangleIndex :(

  2. 1fc7e7a1e205ba85eb6b65121cb9152b?d=mm

    PrawnJeremy

    Feb 03, 2016 19:05

    I put together some quick tests and wanted to share the result in case it helps. Doing a mesh cleanup on my mesh to make sure there were no degenerate triangles never fixed the problem which is why I assumed I couldn't do anything about it on my end in the past. However what I found is that if I triangulate the mesh saved to the FBX myself rather than letting Unity do it, the raycast hit seems to return the correct information. So to me, it seems to be an issue with how Unity triangulates meshes.

  3. 1fc7e7a1e205ba85eb6b65121cb9152b?d=mm

    PrawnJeremy

    Feb 03, 2016 07:03

    Any news on a fix?

  4. 1fc7e7a1e205ba85eb6b65121cb9152b?d=mm

    PrawnJeremy

    Dec 17, 2015 22:47

    Hi Anthony. Thanks for looking into it. There have been several updates in the two months since you posted but this is still active. How is the fix coming along?

  5. 1ea7cd21d79153fa4f1d055ba65bed0b?d=mm

    yant

    Oct 09, 2015 17:13

    Hi there - I'm Anthony from the physics team. Thanks for upvoting this. This is a known issue in PhysX 3.3.1 where it won't correctly compute triangle remap indices when degenerate triangles are present. I'm working on getting a fix public soon.

  6. Ca1db1df872d7de97cdbebae6e991568?d=mm

    Carelw

    Sep 11, 2015 08:48

    When will this be fixed?

  7. 1fc7e7a1e205ba85eb6b65121cb9152b?d=mm

    PrawnJeremy

    Sep 03, 2015 04:27

    This bug has broken my game ever since I upgraded to Unity 5 and I obviously can't ship my first game until this is fixed. This regression has been allowed to linger too long.

  8. 6cd4aaa0589b3f9e116ae3cf0048d49e?d=mm

    kierand

    Jun 24, 2015 12:34

    Still happening in 5.1.1p1. What release will the fix be in?

  9. 6cd4aaa0589b3f9e116ae3cf0048d49e?d=mm

    kierand

    Jun 23, 2015 16:48

    I can also confirm that this happens in 5.0.1p3.

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.