I didn't want the depth to change when the player jumps up, if there is a tree in front of them blocking them from view they would clip through it when jumping.
You should consider adding another tutorial with a better way of handling depth for this type of movement as there are a few issues with the current depth = -y code.