Does the kinetic energy change depending on the direction of the velocity? The kinetic energy is calculated with the following formula:
$$E_k = \frac 12 mv^2$$
Does $v$ represent the value of the velocity?
I mean, if you have a specific direction of the velocity is the formula:
$$E_k = \frac 12 mv_x^2$$
Or
$$E_k = \frac 12 m\left(\sqrt{v_x^2 + v_y^2}\right)^2$$
No matter which of the equations are the correct one, the direction will influence in which is the highest height a body can reach.
Having said that
$$E = E_k + U_G \;\;\;\text{(Mechanical energy)}$$
How would I calculate the highest height a body can reach? I know how to calculate it when I know that it is just vertical movement.
 A: Say we fire a projectile from the $xy$-plane:

The $xy$-plane is the horizontal plane, the $z$-axis is the Normal, running through the centre of the Earth.
At launch ($t=0$) the projectile has velocity vectors $\vec{v_x}$, $\vec{v_y}$ and $\vec{v_z}$. The kinetic energy $K$ is indeed given by:
$$K=\frac12m(v_x^2+v_y^2+v_z^2)$$
So what height would the projectile reach (ignoring of course air drag)?
Understand that only one force acts of the projectile and it acts in the (minus) $z$-direction: gravity.
As the projectile gains height, it also gains potential energy $U$:
$$U=mgz$$
Because gravity only acts in the $z$ direction, only $\vec{v_z}$ is affected and not $\vec{v_x}$ or $\vec{v_y}$. The latter two vectors will influence how far the projectile lands from the launch point but not what height it will reach.
For that reason we can write:
$$mgz=\frac12mv_z^2,$$
from which the maximum $z$ is calculated.
Note that energy conservation is respected. We start off with:
$$T=K=\frac12m(v_x^2+v_y^2+v_z^2)$$
And at the highest point:
$$T=U+K=mgz+\frac12m(v_x^2+v_y^2),$$
with: 
$$mgz=\frac12mv_z^2$$
