We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c484fc1 commit e2659afCopy full SHA for e2659af
Assets/JCSUnity/Scripts/Util/JCS_Physics.cs
@@ -85,8 +85,7 @@ public static class JCS_Physics
85
/// <param name="hits"> A list of raycast hits. </param>
86
public static RaycastHit[] SortHitsByDistance(Vector3 point, RaycastHit[] hits)
87
{
88
- hits.OrderBy((hit) => Vector3.Distance(point, hit.point));
89
- return hits;
+ return hits.OrderBy((hit) => Vector3.Distance(point, hit.point)).ToArray();
90
}
91
92
/// <summary>
0 commit comments