lookAhead beta
Function of @v12-engine/engine
ts
export declare function lookAhead(world: World, entity: Entity, agent: AgentState): void;Looks ahead of a unit on its way for units standing in it (within RuleSettings.movement.lookAhead): a way round the knot they make is taken where it is not much longer (RuleSettings.movement.goesAround, the detour hook); otherwise those of them that make way (RuleSettings.movement.makesWay) are asked to step aside before the unit reaches them. The way round is beside the knot, on the side it sticks out less, at the knot's middle; the unit heads there, and on to its path from there. The number of units sent to this per tick is spread by their ids (LOOK_AHEAD_INTERVAL)