'RealityKit fit model entity within field of view
Using RealityKit I’m trying to position a PerspectiveCamera to fit an ModelEntity within its field of view. Specifically I want the entity to fill the frame as much as possible. Does anyone have a function to do this? I've seen an example in a different environment but am not successful in translating it to RealityKit. I need the function to take all three axis into account when determining the camera distance.
Thanks, Spiff
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
