Added consideration for the z portion of the velocity vector