How to make an object follow the cursor?

Do you know what steps are necessary to make an object follow the cursor regardles the scene rotation?

I can’t figure out how to do it. Now when I move something it’s either slower or faster then the cursor (depends on the zoom?) or the object is moving in the oposite direction if the scene was rotated.

Is there any general rule how this can be done?