In the PlayerControll script the ViewportToWorldPoint uses a Z coordinate value in the Vector3() section. How can this be done in a 2D environment.
Actually, there is not a thing such as 2D in unity enviroment, everything will always be rendered in 3D, 2D mode is just a ortho camera that is facing the x/t plane in a perpendicular angle.
So, since world position can return different sets of z positions, the engine rather uses a vector3 with a static z position than a vector2 and then convert it