AvoidanceParams beta
Interface of @v12-engine/engine
export interface AvoidanceParamsHow 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
adaptiveDepth: number;How many times the adaptive sampling is refined around the best sample
adaptiveDivs
adaptiveDivs: number;How many divisions the adaptive sampling's pattern has
adaptiveRings
adaptiveRings: number;How many rings of samples the adaptive sampling has
gridSize
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
horizTime: number;How many seconds ahead a sample is checked for hitting something
velBias
velBias: number;How far the velocity samples may stray from the velocity the agent wants, 0..1
weightCurVel
weightCurVel: number;How much a sample is penalised for differing from the velocity the agent has
weightDesVel
weightDesVel: number;How much a sample is penalised for differing from the speed the agent wants
weightSide
weightSide: number;How much a sample is penalised for not passing on the preferred side
weightToi
weightToi: number;How much a sample is penalised for hitting something soon