Mouse follows some object in game?

What I mean is, how to let the mouse follow an object in game: when the object moves by keyboard or others, I want to let the mouse pointer move where I see on the screen.
How to do?