Added collision detection for a point in terrainmap