Closed McManning closed 3 years ago
For future reference - derived the conversion from the following data:
Not actually done - seems I didn't take in account viewport dimensions so rescaling the VP screws up all the math. Cool.
projection.size = pow(region3d.window_matrix[1][1], -1)
is what I'm looking for here. Do the math on Blender's side and just push that value through interop.
It's better, but the camera will still position itself in front of objects if they're not on an axis plane / in front of a plane. I also see this same behavior in Unity's own orthographic camera in scene view, so that's kinda dumb.
Going to call this done and splitting off a new ticket for handling distance issues.
Some potentially helpful resources:
https://forum.unity-community.de/topic/15484-blender-camera-matrix-import/ https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/camera.c$363