For the A330/A340 the MLG holds a 14 deg nose up tilt. This allows most of the landing shock loads to be absorbed by the time the front truck wheels rotate to contact. During gear retraction a mechanical "shortening mechanism" operates to shorten the MLG shock strut and, at the same time, rotate the bogie to a perpendicular position so that it can fit into the hole.
N2