How to calculate the real Ground Speed from True Air Speed? In most of the formulas I've found online GS = TAS + Vw, i.e. true air speed plus wind.

However, on the simulator, GS changes drastically if I dive or climb which is obvious because I'm covering 0 ground distance if I dive vertically. 

What is therefore a real GS formula from TAS? It has to take into account the wind (Vw) but also the "3D angle of the aircraft" (for the lack of better expression).
First calculate horizontal component of airspeed, then add the wind:

$$v_{GS} = cos(\theta) * v_{TAS} + v_{wind}$$ with $\theta$ being the angle between the horizon and the path of the aircraft in the vertical plane.

Or, if you are unfamiliar with trigonometry (using Pythagora's theorem):

$$ v_{GS} = \sqrt{v_{TAS}^2-v_{verticalSpeed}^2} + v_{wind}$$

Both formulas assume the same units being used for all speeds ($v_{TAS}$, $v_{verticalSpeed}$, $v_{wind}$), and only take horizontal wind into consideration. $v_{wind}$ is only considering the headwind/tailwind component.