I think I managed to achieve what you want using a simpler equation. Just use these for the MagiCam position:
[code:1kihh9jn]Minimap.MapToLayoutX(MouseX("UI") - Minimap.X)
Minimap.MapToLayoutX(MouseY("UI") - Minimap.Y)[/code:1kihh9jn]
That worked fine for me. I couldn't figure out what was going on with the other equation, although I can take a few guesses. If I have time, I'll take a deeper look into it.
I hope this helps.