Have a static mesh follow the mouse?

Hi, I’d like to know how to move the objects with the mouse in 3d space. Right now the object behaves strangely and jumps right to my face when I click on it