How do I compute targetScreenOffset to center the mesh on the screen?

Consider the following example.

https://playground.babylonjs.com/#WGGV71

Does targetScreenOffset represent screen pixels?But it doesn’t look like it.Can you describe it clearly?

No, targetScreenOffset is not in pixels, it is simply some x/y translation values that are added to the view matrix after it is computed and before it is used to transform vertices.