bugfix - reset randomRef, randomPt

This commit is contained in:
ikpil 2023-06-10 22:41:50 +09:00
parent 83da4196e4
commit 3d2cb74e2c
1 changed files with 3 additions and 1 deletions

View File

@ -411,7 +411,9 @@ namespace DotRecast.Detour
float[] areas = new float[randomPolyVerts.Length / 3];
RcVec3f pt = DetourCommon.RandomPointInConvexPoly(randomPolyVerts, randomPolyVerts.Length / 3, areas, s, t);
ClosestPointOnPoly(randomPolyRef, pt, out var closest, out var _);
Results.Success(new FindRandomPointResult(randomPolyRef, closest));
randomRef = randomPolyRef;
randomPt = closest;
return status;
}