Search Issue Tracker
Fixed in 5.5.0
Votes
31
Found in
5.0.1f1
Issue ID
699563
Regression
Yes
RaycastHit returns the wrong triangle index in Unity 5
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.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
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 :(
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.
PrawnJeremy
Feb 03, 2016 07:03
Any news on a fix?
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?
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.
Carelw
Sep 11, 2015 08:48
When will this be fixed?
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.
kierand
Jun 24, 2015 12:34
Still happening in 5.1.1p1. What release will the fix be in?
kierand
Jun 23, 2015 16:48
I can also confirm that this happens in 5.0.1p3.