# How do I convert the position data of a given engine to another and keep the screen displaying position?

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.

On a side note, I believe it is possible to change the view and projection matrix in a roundabout way as discussed here: [SOLVED] How to initialize camera by matrix?

That’s the way to set a camera position and rotation which has been proved not working in my case.

I’m a bit confused by this, if you already are building 3D space from this 2D image and metadata, it shouldn’t matter where the PlayCanvas camera is as it’s just another object.

Do you need the PlayCanvas camera to be in a specific position/rotation/POV?

Do you have project to link and a visualisation of what it is supposed to look like and what it looks like now?