Note that the "base", or shadow, of the ball has both an x and y position, on the horizontal plane. The ball itself has an additional "height", or z position, otherwise it will be the same as the shadow. You can keep track of the height with a separate instance variable, and add this to the y coordinate of the shadow to get the position of the ball.
Fundamental projectile logic follows that horizontal and vertical velocities are independent of each other. The shadow will keep track of the horizontal velocity (which has both x and y components), and it is always constant, so the bullet behavior is suitable for it. The vertical velocity of the ball is set at impact, and is affected by gravity at a constant rate, so you'll subtract a set amount from the vertical velocity over time.
physicsclassroom.com/class/vectors/Lesson-2/Horizontal-and-Vertical-Components-of-Velocity