Class PathfindUtil
Utility methods for pathfinding operations.
Inheritance
System.Object
PathfindUtil
Namespace: Eco.Simulation.Pathfinding.Internal
Assembly: Eco.Simulation.dll
Syntax
public static class PathfindUtil : Object
Methods
SelectFromTopCandidates(List<(WorldPosition3i, Single)>)
Efficiently selects a position from candidates by finding the top 3 scoring candidates and randomly picking from them. This provides good direction bias while maintaining some randomness for natural movement.
Declaration
public static WorldPosition3i SelectFromTopCandidates(List<(WorldPosition3i, float)> candidates)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<System.ValueTuple<WorldPosition3i, System.Single>> | candidates | List of candidates with their scores |
Returns
| Type | Description |
|---|---|
| WorldPosition3i | The selected position |