Skip to content

Commit

Permalink
log if rpb cannot find closest point
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzeroglu committed Aug 18, 2020
1 parent ed2d6ae commit 56b794b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/steering/behavior/RandomPathBehavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { logger } from "../../debug/Logger";
var LOGGER_COMPONENT_NAME = "RandomPathBehavior";
var LOG_PATH_CONSTRUCTED = "Path constructed.";
var LOG_FOLLOWING_PATH = "Following path.";
var LOG_CLOSEST_POINT_NOT_FOUND = "Closest point not found.";

var RandomPathBehavior = function(options){

Expand Down Expand Up @@ -48,6 +49,7 @@ RandomPathBehavior.prototype.constructPath = function(steerable){
var startPoint = graph.findClosestVertexToPoint(steerable.position);
if (!startPoint){
startPoint = this.getRandomWaypoint();
logger.log(LOGGER_COMPONENT_NAME, LOG_CLOSEST_POINT_NOT_FOUND, steerable.id);
}
var endPoint = this.getRandomWaypoint();

Expand Down

0 comments on commit 56b794b

Please sign in to comment.