The problem with your solution is that a constant $z$ means that the satellite is not moving around the center of the planet, but around the point $z$. What you need is to rotate the orbit. Suppose that the new axis of rotation is in the $xz$ plane making an angle $\theta$ with respect to the $z$ axis. To rotate the vertical axis into this axis, you rotate around the $y$ axis by the angle $\theta$. You can write the rotation matrix. You can now multiply this matrix with your initial $r$ to get $$< |r|\cos t \cos\theta, |r| \sin t, -|r|\cos t\sin \theta>$$