Fixed function to check the origin of animation.