diff --git a/src/pathfinding.rs b/src/pathfinding.rs index 72579a0..fb234ad 100644 --- a/src/pathfinding.rs +++ b/src/pathfinding.rs @@ -110,7 +110,6 @@ fn find_path_for_shape( fn calculate_path( mut commands: Commands, - pool: Res, rapier_context: Res, obstructions: Query<&RapierColliderHandle, With>, query: Query< @@ -157,6 +156,7 @@ fn calculate_path( } } let shape_clone = (*shape).clone(); + let pool = AsyncComputeTaskPool::get(); let task = pool.spawn(async move { find_path_for_shape( handle_clone.0,