I'm new to Blender. I wrote a Python script where I sequentially read the camera poses from a csv file (real user traces), move the camera accordingly and render the scene. In my scene, there is a virtual object but for each camera trace, orientation of the camera is different so I have to manually re-adjust the position of the virtual object for it to fall within the camera viewport.
How can I set the location of the object automatically, depending on the camera orientation? Assume a constant distance between the camera and the object, I just want to adjust the orientation.