|
CameraUtilsGetOrthographicWorldSize Method |
GetOrthographicWorldSize calculates a size in 3D world from
a screen size (screenSize in screen coordinates) that is at distanceFromCamera and shown with orthographic camera with cameraWidth and in SceneView with viewSize.
Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax public static Vector2 GetOrthographicWorldSize(
Vector2 desiredScreenSize,
float cameraWidth,
Vector2 viewport3DSize
)
Parameters
- desiredScreenSize Vector2
- Size on screen (in same units as viewSize - without DPI scale)
- cameraWidth Single
- camera's width
- viewport3DSize Vector2
- SceneView's size as Vector2
Return Value
Vector23D world size as Vector2
See Also