private void IDLE(Vector3f direction, float distance)
    {

                Vector2f lineStart = new Vector2f(transform.getTranslation().getX(), transform.getTranslation().getZ());
                Vector2f castDirection = new Vector2f(direction.getX(),direction.getZ());
                Vector2f lineEnd = lineStart.add(castDirection.mul(1000.0f));

                Vector2f colVector = Game.getLevel().checkIntersection(lineStart, lineEnd, false);

                Vector2f playerIntersectVector = Game.getLevel().lineInterSectRect(lineStart,lineEnd, new Vector2f(Transform.getCamera().getPos().getX(), Transform.getCamera().getPos().getZ()), new Vector2f(Player.PLAYER_SIZE, Player.PLAYER_SIZE));

                if(playerIntersectVector != null &&  (colVector == null ||
                        playerIntersectVector.sub(lineStart).length() < colVector.sub(lineStart).length())) {
                    state = STATE_CHASE;
                }


    }