collisiosn method onside terrain class