Let \(n\ge 5\) and let K and L be two convex bodies in \({{\mathbb {R}}^n}\) such that their orthogonal projections K|G and L|G onto any \((n-1)\) -dimensional subspace G are rotations of each other, i.e., there exists a rotation \(\varphi _G\in SO(n-1, G)\) such that \(\varphi _G(K|G)=L|G\) . Assume also that the 2-dimensional projections of K and L are pairwise different and they do not have SO(2)-rotational symmetries. Then K and L are congruent. More precisely, we show that \(K=L\) , or \(K=-L\) , or there exists an orthogonal transformation \(\Phi \in O(n)\) such that \(\Phi (K)=L\) . We also prove an analogous result for sections of star bodies. Both results are the consequences of a more general statement about continuous functions on the unit sphere in \({{\mathbb {R}}^n}\) .