ZBuffer added, to solve the walking on house roof problem