This specification discloses a method, apparatus, storage medium, and electronic device for following visual offset. First, an input vector corresponding to the original
pose data of a target object is obtained, wherein the target object corresponds to at least one sub-logical object. Then, the vertical component of the texture coordinates of the sub-logical object in the
texture space of the target object is obtained at the CPU. Based on the vertical component and preset manual correction parameters, a representative depth value of the sub-logical object is obtained. Based on the input vector, the representative depth value, the focal plane depth value, and the global
parallax scaling factor, the
texture space offset corresponding to the sub-logical object is obtained. The
texture space offset is inversely projected from the texture space to
world space to obtain the corresponding world coordinate displacement. Based on the original reference position of the sub-logical object and the world coordinate displacement, the final position of the sub-logical object is obtained, and the final position is assigned to the transformation component of the sub-logical object so that the sub-logical object follows the visual offset of the target object.