Cursor prefab raycast from camera moves toward camera when camera is still

Hi - I’m raycasting a cursor on the surface of a plane by placing a prefab at the ray hit point. All works as expected except that the prefab moves toward the camera (I’m raycasting from the camera view). It’s supposed to simply skim along the surface of the plane wherever the camera looks. How can I fix this?

    Ray ray;
    RaycastHit hit;

    void Start()
    {
        ray = camera.ViewportPointToRay(new Vector3(0.5F, 0.5F, 0));
    }

    void FixedUpdate()
    {
        if (Physics.Raycast(ray, out hit))
        {
            if (_cursor.activeSelf == false)
                _cursor.SetActive(true);
            _cursor.transform.position = hit.point;
            print("The hit.point is: " + hit.point);
            _cursor.transform.rotation = hit.transform.rotation;
            print("I'm looking at " + hit.transform.name);
        }
        else
        {
            print("I'm looking at nothing!");
            _cursor.SetActive(false);
        }
    }

I found the problem - it was that the raycast was hitting the cursor prefab itself. The fix is to either set the raycast to detect things in a different layer than the cursor, or to assign the cursor to the ignore raycast layer. Here was the question and answer that got me to this solution.