We have the technology
Peek-a-boo, Timmy...
you're dead...
The rifle's gunsight uses a laser rangefinder to calculate the exact distance to the obstruction. The soldier can then add or subtract up to 3 metres from that distance to enable the bullets to clear the barrier and explode above or beside the target.
As the 25-millimetre round is fired, the gunsight sends a radio signal to a chip inside the bullet, telling it the precise distance to the target.
The rifle would allow a soldier faced with a sniper firing from a window to take a distance measurement to the window, add a metre, fire through the window, and have the round detonate 1 metre inside the room. The same method could be used to fire behind a wall or over a trench.
*