© 2019 SPIE. Phase shifting profilometry (PSP) is considered as an effective method for 3D shape measurement based on fringe projection. However, PSP is not suitable for dynamic measurement, as it requires that the object be kept still. Movement of the object during the cause of projection of multiple fringe patterns may lead to significant error in the measurement of the 3D shape. A number of approaches were proposed to combat this problem consisting of two steps: Capturing of the movement and then compensation (or correction) of fringe patterns. However, such compensation is only valid for the cases where the object moves or rotates in the way that all points on the object surface change by the same amount. In other words, there is still not a method effective for measuring objects moving in a free 3D space. In this paper, a new method is proposed to combat the problem. Firstly, movement of the object is capturing by means of existing methods, yielding rotation matrix and translation vector, able to characterize arbitrary movement in a 3D space. Secondly, variation of the fringe patterns by the movement is analyzed and formulated, leading to the expressions of phase maps. Based on these expressions, a new method is proposed to compensate the variance on height map, with which PSP can be used to yield improved measurement performance. Computer simulations is carried out to verify the effectiveness of the proposed method.