Left: the spin density matrix element $\rho_{00}$ of prompt D$^{*+}$ mesons as a function of $p_{\rm T}$ in the rapidity interval $0.3 < |y| < 0.8$ for central (0--10%) and midcentral (30--50%) Pb--Pb collisions at $\sqrt{s_{\rm NN}}=5.02$ TeV. Right: $\rho_{00}$ of prompt D$^{*+}$ mesons as a function of $p_{\rm T}$ in the two rapidity intervals for midcentral (30--50%) Pb--Pb collisions at $\sqrt{s_{\rm NN}}=5.02$ TeV. The measurements are carried out with respect to the direction perpendicular to the reaction plane. Statistical and systematic uncertainties are represented by bars and boxes, respectively.