For planned paths use the current position as the first NavigationPoint.

WorldChunkRefactoring
Martin Felis 2023-10-27 22:11:45 +02:00
parent 01fde34276
commit d70d9cd682
1 changed files with 1 additions and 0 deletions

View File

@ -160,6 +160,7 @@ public class NavigationComponent : Spatial
// Perform smoothing // Perform smoothing
_planningPathSmoothedWorldNavigationPoints = SmoothPath(body, _planningPathWorldNavigationPoints); _planningPathSmoothedWorldNavigationPoints = SmoothPath(body, _planningPathWorldNavigationPoints);
_planningPathSmoothedWorldNavigationPoints[0] = new NavigationPoint(fromPositionWorld);
} }
public void FindPath(KinematicBody body, Vector3 fromPositionWorld, NavigationPoint navigationPoint) public void FindPath(KinematicBody body, Vector3 fromPositionWorld, NavigationPoint navigationPoint)