Let’s imagine the screen as a 2D map with x and y axis, and any 3D point displayed on the screen can be described as an (x, y) coordinate.
If I get it right, the (x, y) is determined by at least three values: the world position of the 3D point, the view matrix and the projection matrix of the engine displaying the 3D point.
Say there are two engines: one is my little toy engine, and another is Play Canvas.
To have my engine display a point at the (x, y) of the screen , I feed it three values: my_word_position, my_view_matrix, my_projection_matrix.
To have Play Canvas display a point at the same (x, y) position of the screen, I also need to feed it three values: pc_world_position, pc_view_matrix, pc_projection_matrix.
So I get the equitation:
f(my_word_position, my_view_matrix, my_projection_matrix) = f(pc_word_position, pc_view_matrix, pc_projection_matrix).
The variables that are known to me are: my_word_position, my_view_matrix, my_projection_matrix, pc_view_matrix, pc_projection_matrix.
So how can I calculate the pc_word_position?
To clarify the purpose of this question:
I have an algorithm which builds a 3D space from an image. The image is a photo taken by some people with his camera or cellphone.
To build a 3D space, the photo taker provide us with essential corner points and edge data in 2D. The output of this algorithm is the point data in 3D and the view matrix and projection matrix.
To use the output in Play Canvas engine, I build a model from the 3D positions, and set the camera position using the matrices.
However, the camera is not in the same position as the position of the camera or cellphone of the photo taker.
So my guess is that this is not about camera.
Changing the camera position or rotation changes the angle you look into the space. But our goal is not to look in a different angle, but to have the same screen displaying result.
Play Canvas has its own default view matrix and projection matrix and they are read only.
So to have the same screen displaying result, the only approach left is to change the position data.