Follow cam direction on X and Z only ?

Hi
this script allows an object to follow camera direction when it moves. but when camera above or under it. it goes up and down of the terrain. What i need is to make it move with the direction of camera X Z only.

  moveH = Input.GetAxis("Horizontal");
        moveV = Input.GetAxis("Vertical");

        moves = new Vector3(moveH, 0.0f, moveV);
        moves = cam.TransformDirection(moves);
        rb.AddForce(moves * 20.0f);

Do i need to change TransformDirection ?

This is very similar to the roll-a-ball tutorial camera script. Check it out.

My camera is not above object position like Roll a Ball. Is moving around it. is the same third person camera.