Direction Of Raycast/DrawLine doesn't work

Raycast direction behaves in an unknown way for me:

I have the next code to detect if there is something above the player

            RaycastHit hit; 
        float newYPos = DefaultHeight; 
        Vector3 raycastToVector = new Vector3(objectToFollow.position.x, objectToFollow.position.y + 2f, objectToFollow.position.z);
        if (Physics.Raycast(objectToFollow.position, raycastToVector, out hit))
        {
            if (hit.distance < 1)
            {
                newYPos = hit.transform.position.y - 0.2f;
            } else
                camera.orthographicSize = DefaultScale;

            Debug.DrawLine(objectToFollow.position, hit.point, Color.yellow);
        } else
            Debug.DrawLine(objectToFollow.position, raycastToVector, Color.red);

When the cylinder (objectToFollow) stays far away from the side plane wall, it doesn’t detect the top plane.
156869-raycastup.png

But if I come close to the side plane, DrawLine suddenly shows a very weird ray cast direction. What am I missing?
156870-raycasttowall.png

Moreover, if I replace raycastToVector to objectToFollow.up, it shows red line which goes to the beginning of map coordinates.

I’ve got it sorted out. The problem is that I was using DrawLine instead of DrawRay for testing. DrawLine creates a line between points A and B, and DrawRay creates a ray that has staring point and direction. Therefore debug lines on my screen weren’t exactly the Rays I was trying to display.

Also method:

Physics.Raycast(objectToFollow.position, raycastToVector, out hit)

Where raycastToVector is some weird thing that must be replaced with just actual direction, like Vector3.up