When do you use the equation y=1/2gt^2 ?
When initial position is zero, initial velocity is zero, and the only y direction acceleration is due to gravity