Have An Object Follow Mouse Cursor?

Is it possible to click on on object and then have it follow your mouse cursor and then click on it again and it drops back to the screen at the new location? I tried working with the logic blocks, but couldn’t find a way to do this.

You have to use python. Search for “mouselook”