Ejemplo n.º 1
0
void Guard::CheckPathProgress()
{
	//If we are close to the our target, set our target to the next on the list
	Vec3 guardPos = characterController->GetPosition();
	Vec3 targetPos = wayPoints[currentWaypoint];
	if(guardPos.DistanceToPoint(targetPos) < 1)
	{
		//If the currentTarget is is lower than the amount of waypoint we increase it, otherwise we go back to the first waypoint
		//currentWaypoint + 1 == wayPoints.size() ? currentWaypoint = 0 : currentWaypoint++;
		//SetTarget(wayPoints[currentWaypoint]);
	}
}