ADDED: implemented proper working getHeight functuion for the terrain