I've just built up a VL53L0X module and it seems very very accurate and fast. Its laser and calculates TOF and seems to be millimetric accurate up to about 200cm and only £10. Two of these spaced apart and if both detect something in range, then fire. That would make sure that something was therefore in the middle. Combine it with the IMU and you could make sure it would only fire on the level and not start hitting at the floor if tilted etc.

vl53lox.jpglaser.jpg