We consider an impacting mechanical system in which a particle at position u(t) impacts with a periodically moving obstacle at position z(t), the motion of which is non-smooth. In particular we look at corner events when u impacts with z very close to a point where z loses smoothness. We show that this leads, through a corner bifurcation, to complex dynamics in u which can include periodic orbits of arbitrary period and period-adding cascades. By analysing associated maps close to the corner event, we show that this dynamics can be understood in terms of the iterations of a two-dimensional, piecewise linear, discontinuous map. We also show some links between this analysis and the difficult problem of understanding the motion of three objects which may have simultaneous impacts.