Relationship between orthographic size and object scale?

Hello,

I’m currently working on creating a 2D game using planes textured with a sprite.

It’s very important to the gameplay that the width of the plane in the middle of the screen (Main character) is always 10% of the screen width. For example if the screen width is 1000 pixels, the 3D plane must be exactly 100 pixels.

With GUI’s its very easy to specify the size of a texture. However 3D object width can only be controlled using its scale value.

Is there a formula or node I can use to set the pixel width of a 3D (plane) object using the width of the screen?

Thanks.

Here you go:

Ortho width = Unreal units (cm). This means that if your ortho with is 400 and your object width is 400 you cover the entire screen.
Ortho height = Ortho width / Aspect Ratio.

Thank you.