Kaim::TargetOnPathComputer< TraverseLogic > Class Template Reference

Kaim::TargetOnPathComputer< TraverseLogic > Class Template Reference

#include <targetonpathcomputer.h>

Class Description

template<class TraverseLogic>
class Kaim::TargetOnPathComputer< TraverseLogic >

This class updates Bot's target on path so that:

  • it is always directly reachable from Bot current position in straight line
  • it is less than a maximal distance from the Bot. If the current target on path is not directly reachable, it searches a new target on path backwards. This case happens when the Trajectory or the game engine moved the Bot in another direction than towards its target on path. All the parameters to control this computer are in TargetOnPathConfig. If it can't manage to find a valid target on path, the TargetOnPathStatus is status and take your own decision (compute a path to the same destination, pick a new destination...).

Functions

 TargetOnPathComputer ()
 
void SetupShortcutTrajectoryConfig (const ShortcutTrajectoryConfig &config)
 
KyResult ComputeTargetOnPath (Bot *bot, TargetOnPath &targetOnPath, KyFloat32 simulationTimeInSeconds, ComputeTargetOnPathSearchControl forwardSearchControl)
 
void Clear (Bot *bot)
 
static bool IsComputationRequiredThisFrame (Bot *bot, KyFloat32 timeToNextUpdate, const TargetOnPath &targetOnPath)
 

The documentation for this class was generated from the following files: