Skip to content

AvoidanceParams beta ​

Interface of @v12-engine/engine

ts
export interface AvoidanceParams

How agents steer around each other: Detour's obstacle avoidance parameters, which weigh the velocities an agent samples each tick. The one that costs least wins: going the speed it wants (weightDesVel), going as it went (weightCurVel), passing on its preferred side (weightSide), and how soon it would hit something (weightToi, within horizTime seconds). velBias is how far the samples stray from the velocity it wants, 0..1

Members ​

adaptiveDepth ​

ts
adaptiveDepth: number;

How many times the adaptive sampling is refined around the best sample

adaptiveDivs ​

ts
adaptiveDivs: number;

How many divisions the adaptive sampling's pattern has

adaptiveRings ​

ts
adaptiveRings: number;

How many rings of samples the adaptive sampling has

gridSize ​

ts
gridSize: number;

Samples a side in the grid sampling, odd. Only the adaptive sampling is used by the engine, which goes by the three below

horizTime ​

ts
horizTime: number;

How many seconds ahead a sample is checked for hitting something

velBias ​

ts
velBias: number;

How far the velocity samples may stray from the velocity the agent wants, 0..1

weightCurVel ​

ts
weightCurVel: number;

How much a sample is penalised for differing from the velocity the agent has

weightDesVel ​

ts
weightDesVel: number;

How much a sample is penalised for differing from the speed the agent wants

weightSide ​

ts
weightSide: number;

How much a sample is penalised for not passing on the preferred side

weightToi ​

ts
weightToi: number;

How much a sample is penalised for hitting something soon