提取RVO 寻路

This commit is contained in:
PC-20230316NUNE\Administrator
2024-02-05 18:56:55 +08:00
parent 04043cc6fc
commit 16d943ab6b
208 changed files with 42246 additions and 37182 deletions

View File

@@ -201,7 +201,9 @@ namespace Pathfinding.RVO {
}
/// <summary>Creates obstacles</summary>
public void Start () {
public override void OnSyncStart()
{
base.OnSyncStart();
addedObstacles = new List<ObstacleVertex>();
sourceObstacles = new List<Vector3[]>();
prevUpdateMatrix = GetMatrix();
@@ -212,7 +214,9 @@ namespace Pathfinding.RVO {
/// Updates obstacle if required.
/// Checks for if the obstacle should be updated (e.g if it has moved)
/// </summary>
public void Update () {
public override void OnSyncUpdate(int dt, JNFrameInfo frame, Object input)
{
base.OnSyncUpdate(dt, frame, input);
Matrix4x4 m = GetMatrix();
if (m != prevUpdateMatrix) {
@@ -223,7 +227,6 @@ namespace Pathfinding.RVO {
}
}
/// <summary>
/// Finds a simulator in the scene.
///