forked from mirror/DotRecast
rebase
This commit is contained in:
parent
dd9a5e55fc
commit
fd3a0201f8
|
@ -49,7 +49,7 @@ namespace DotRecast.Detour.Extras.Unity.Astar
|
||||||
startTile.header.vertCount += 2;
|
startTile.header.vertCount += 2;
|
||||||
DtOffMeshConnection connection = new DtOffMeshConnection();
|
DtOffMeshConnection connection = new DtOffMeshConnection();
|
||||||
connection.poly = poly;
|
connection.poly = poly;
|
||||||
connection.pos = new RcVec3f[]
|
connection.pos = new Vector3[]
|
||||||
{
|
{
|
||||||
l.clamped1, l.clamped2
|
l.clamped1, l.clamped2
|
||||||
};
|
};
|
||||||
|
|
|
@ -856,7 +856,7 @@ namespace DotRecast.Detour
|
||||||
};
|
};
|
||||||
|
|
||||||
// Find polygon to connect to.
|
// Find polygon to connect to.
|
||||||
RcVec3f p = targetCon.pos[1];
|
Vector3 p = targetCon.pos[1];
|
||||||
var refs = FindNearestPolyInTile(tile, p, ext, out var nearestPt);
|
var refs = FindNearestPolyInTile(tile, p, ext, out var nearestPt);
|
||||||
if (refs == 0)
|
if (refs == 0)
|
||||||
{
|
{
|
||||||
|
@ -1093,7 +1093,7 @@ namespace DotRecast.Detour
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
RcVec3f[] p = con.pos; // First vertex
|
Vector3[] p = con.pos; // First vertex
|
||||||
// findNearestPoly may return too optimistic results, further check
|
// findNearestPoly may return too optimistic results, further check
|
||||||
// to make sure.
|
// to make sure.
|
||||||
if (RcMath.Sqr(nearestPt.X - p[0].X) + RcMath.Sqr(nearestPt.Z - p[0].Z) > RcMath.Sqr(con.rad))
|
if (RcMath.Sqr(nearestPt.X - p[0].X) + RcMath.Sqr(nearestPt.Z - p[0].Z) > RcMath.Sqr(con.rad))
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace DotRecast.Detour
|
||||||
|
|
||||||
ref DtPolyDetail pd = ref tile.data.detailMeshes[i];
|
ref DtPolyDetail pd = ref tile.data.detailMeshes[i];
|
||||||
|
|
||||||
RcVec3f[] verts = new RcVec3f[3];
|
Vector3[] verts = new Vector3[3];
|
||||||
for (int j = 0; j < pd.triCount; ++j)
|
for (int j = 0; j < pd.triCount; ++j)
|
||||||
{
|
{
|
||||||
int t = (pd.triBase + j) * 4;
|
int t = (pd.triBase + j) * 4;
|
||||||
|
|
|
@ -18,6 +18,7 @@ freely, subject to the following restrictions:
|
||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System.Numerics;
|
||||||
using DotRecast.Core.Numerics;
|
using DotRecast.Core.Numerics;
|
||||||
|
|
||||||
namespace DotRecast.Detour
|
namespace DotRecast.Detour
|
||||||
|
@ -27,7 +28,7 @@ namespace DotRecast.Detour
|
||||||
public class DtOffMeshConnection
|
public class DtOffMeshConnection
|
||||||
{
|
{
|
||||||
/// The endpoints of the connection. [(ax, ay, az, bx, by, bz)]
|
/// The endpoints of the connection. [(ax, ay, az, bx, by, bz)]
|
||||||
public RcVec3f[] pos = new RcVec3f[2];
|
public Vector3[] pos = new Vector3[2];
|
||||||
|
|
||||||
/// The radius of the endpoints. [Limit: >= 0]
|
/// The radius of the endpoints. [Limit: >= 0]
|
||||||
public float rad;
|
public float rad;
|
||||||
|
|
Loading…
Reference in New Issue