TLDR: Given an object that's within my camera view, I want to move the object exactly towards / away from the camera's "origin" such that the object will appear to remain in the same position from the camera's perspective. How can I do this?
I'm new to Blender and dabbling with camera-matching techniques to manually reconstruct a 3D mesh by matching up several static images (from an old game I love). As a first step, I'm trying to figure out how Blender's "Align to view" feature works, and having trouble.
First I added a Camera and entered "Camera view", and used shift + right click to place a 3D cursor somewhere in front of the camera. See screenshot - the left pane is the camera view and the right pane is another view from the side:
Then I clicked Add -> Empty -> Plain axes (the simplest movable object I can think of) and selected "Align to view":
As expected, the new object's local axes are aligned to the camera view. In a second viewport, I can look at the object from a different angle, and click and drag the (blue) Z axis to move the object towards and away from the camera view. But what I did not expect is that the Z axis is perpendicular to the camera "lens plane", it's not pointing directly at the center of the viewport. As a result, moving the object along the Z axis causes it to change position from the camera's perspective:
I also tried setting the 3D cursor to the camera (ie. the very back point of the camera) and then aligning the object to the cursor, but this seemed to have the same result: the object's Z axis was perpendicular to the camera "lens plane", rather than pointing at the cursor itself.
What I want is to align an object's axis to point exactly to the back tip of the camera (or to the 3D cursor), so that I can move the object along the Z axis without it changing position from the camera's perspective. How can I accomplish this?
I remember playing around with this on an older version of Blender in 2016, and got it to work without trouble, but Blender's UI has changed a lot since then. Note: I'm now on Blender 2.91.2 on a Mac, if it matters.