How To Make a 3d object follow mouse and move towards it while the camera is following that 3d object?

I need to make a character move towards the mouse when I press space. When it’s looking at the mouse it should rotate about y axis.

Good day.

You are asking so many things at same time… If you have no clue how to do it, you should spend some hours watching tutorials and reading about all this functions (google them):

  1. Camera.WorldToScreenPoint
  2. Input.MousePosition
  3. LookAt
  4. Input.GetKey
  5. Input.GetKeyDown
  6. Transform.rotate
  7. NavMesh System

Good Luck!
Bye!