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.
Comments (9)
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
- [Android][BiRP] Depth processing is handled incorrectly on certain Android devices when using 2 camera's
- [APV] Cancelling Display Dialog Error is thrown after Adaptive Probe Volumes tab is open in Lighting Window
- [APV] NullReferenceException is thrown when baking Adaptive Probe Volume for a Terrain with Non-GI Contributing Tree Prototypes and multiple APV objects with different LayerMasks are present on the scene
- Hands are not recognized when using Hololens 2
- "OnTriggerExit2D" is called before "OnTriggerEnter2D" when object is destroyed immediately
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.