The PathFinding
script is part of the OmniVehicleAi system. It is responsible for finding the shortest path between two waypoints and generating a spline for the AI vehicle to follow. This is a key component for AI navigation, particularly in scenarios where the AI needs to dynamically move between different points in a scene.
waypointSystem
, which manages all waypoints in the scene. It provides functions to get the nearest waypoint and calculate the shortest path between two waypoints.waypointSystem
is used to find the waypoints needed for pathfinding, and it helps in creating a spline path from these waypoints.AIVehicleController
to find the AI vehicle’s current position and calculate the nearest waypoint from that position for starting the pathfinding process.PathProgressTracker
, which tracks the AI vehicle's movement along a path and handles spline-related movement.pathProgressTracker
to update the path spline, ensuring that the AI vehicle follows the correct path once the shortest route is calculated.