private void Update()
    {
        //Move the ray
        goingLeft = GetDirection();

        Debug.DrawRay(gameObject.transform.position, transform.TransformDirection(Vector3.forward) * viewRange);
        Vector3 newPosition = gameObject.transform.localPosition;

        if (goingLeft)
        {
            newPosition.x += Time.deltaTime * POINTER_SPEED;
        }
        else
        {
            newPosition.x -= Time.deltaTime * POINTER_SPEED;
        }

        gameObject.transform.localPosition = newPosition;
        Ray        searchRay = new Ray(gameObject.transform.position, transform.forward);
        RaycastHit hitObject = new RaycastHit();

        if (Physics.Raycast(searchRay, out hitObject, viewRange))
        {
            if (hitObject.transform.name != "Terrain" && hitObject.transform.tag != "wall" &&
                hitObject.transform.tag != "Player" && !hitObject.transform.name.Contains("Shell") &&
                !hitObject.transform.name.Contains("Rocket") && hitObject.transform.tag != "mountain")
            {
                objectFound = hitObject.transform.position;
                if (setPositionData.fakeWaypointsID.Count == 0)
                {
                    currentObjectBeingDodged = new Vector3(0, 0, 0);
                }
                if (currentObjectBeingDodged != objectFound)
                {
                    setPositionData.ResetFakePoints();
                    currentObjectBeingDodged = objectFound;

                    Vector3 currentWaypoint = setPositionData.wayPoints[setPositionData.currentWaypoint];
                    Vector3 newFirstPoint   = GetPoint(hitObject, currentWaypoint, true);
                    Vector3 newSecondPoint  = GetPoint(hitObject, currentWaypoint, false);

                    AddWaypoint(newFirstPoint, false);
                    AddWaypoint(newSecondPoint, true);
                }
            }
        }
    }