Skip to main content

MovementPrediction

Class which allows to predict unit movement

Functions

GetPrediction

MovementPrediction.GetPrediction(
unit: AIBaseClient,
delay: float
) PredictionOutput

ArgumentTypeDescription
unitAIBaseClientGiven entity for movement prediction
delayfloatDelay to be used in calculations besides latency and serverTick

Get movement prediction.

danger

Be aware that this overload has bFt boolean argument as true by default. Therefore this will add extra delay (latency and serverTick) in calculations. If used in wrong way it may lead to inaccurate results.


GetPrediction

MovementPrediction.GetPrediction(
input: PredictionInput,
bFt: boolean,
bCheckCollision: boolean
) PredictionOutput

ArgumentTypeDescription
inputPredictionInputGiven prediction input
bFtbooleanIf true - this will add latency and serverTick to delay in calculations
bCheckCollisionbooleanIf true - this will also check for collision

Get movement prediction.


GetCollision

MovementPrediction.GetCollision(
positions: Vector3[],
input: PredictionInput
) boolean

ArgumentTypeDescription
positionsVector3[]Given positions
inputPredictionInputGiven prediction input

Get collision. This returns if there is any collision.


GetCollisionEx

MovementPrediction.GetCollisionEx(
positions: Vector3[],
input: PredictionInput
) CollisionResult[]

ArgumentTypeDescription
positionsVector3[]Given positions
inputPredictionInputGiven prediction input

Get collision. This returns multiple results. May be useful for logic of spells which explode with their colliders.

danger

This is expensive function. Please use with caution or use MovementPrediction.GetCollision instead.