Detour beta
Interface of @v12-engine/engine
ts
export interface DetourA unit is about to go round units standing in its way (around), by point, which is longer ground units more than the straight way to the next corner of its path (see RuleSettings.movement.goesAround): change the point, or make it null to have it go straight through, asking them aside. Asked as it comes up to them: keep it cheap
Members
around
ts
readonly around: readonly Entity[];The units standing in its way
entity
ts
readonly entity: Entity;The unit about to go round the others
longer
ts
readonly longer: number;How many ground units longer the way by point is than the straight way
point
ts
point: Vec2 | null;The point it goes by round the others; change it, or null to go straight through
straight
ts
readonly straight: number;The distance of the straight way to the next corner of its path, in ground units