freeSpot beta
Function of @v12-engine/engine
ts
export declare function freeSpot(world: World, attacker: Entity, target: Entity, straight?: boolean): Vec2 | undefined;Where the attacker could fight the target from now: a place with room for it (isCrowded) where no one stands, nor is on the way to: round a unit on its ring, round a building by its sides, the nearest its own side first. straight (the default): only one it can walk straight to without pushing through those fighting a unit (round a building, the way round is the navigation's); false: any, however far round. None when there is no room for it or every place is taken; the target's own place for what flies. What an attacker waiting for room (holdOff) asks before it goes in