[Bolt] Minimap bug

for some reason it loses focus and there seems to be a scaled offset.

Here is the graph:

here is what happens:

working spot:

loses focus gradually:

How do i fix this gradual offset? I can’t figure out how to calculate it correctly.

The graph basically equals this in c#:

Camera minimapCam;
    void Test()
        RaycastHit hitinfo;
        Ray rayy = minimapCam.ScreenPointToRay(Input.mousePosition);
        if (Physics.Raycast(rayy, out hitinfo))
            Camera.main.transform.position = new Vector3(hitinfo.point.x, Camera.main.transform.position.y, hitinfo.point.z - 75);

I fixed this problem myself it has to do with the ray’s origin. Unity does not calculate all factors correctly with ScreenPointToRay