/// <summary> /// only used for when it is trapped /// </summary> /// <returns></returns> bool GetTrappedMovingDirection() { Detection.DIRECTIONS kittenDirection = mouseDetection.GetTargetDirection(mouseDetection.kittenObject.transform.position); Detection.DIRECTIONS playerDirection = mouseDetection.GetTargetDirection(mouseDetection.playerObject.transform.position); Detection.DIRECTIONS tempDir = Detection.DIRECTIONS.NONE; tempDir = GetTrappedRunningDir(playerDirection, kittenDirection); // theres no other path if (tempDir == Detection.DIRECTIONS.NONE) { // idk what to do here yet // this is where it needs to do bouncing back and forth isTrappedMovement = true; // set a random moving direction to start the bounce movingDir = playerDirection; } else { movingDir = tempDir; return(true); } return(false); }