Determine camera distance for object to be completely visible
Scene Description:
I have a GameObjects created at runtime, centered at (0,0,0) with a with a width and height (x and z). I have a topdown camera(rotation: (90,0,0)) also at x:0 z:0.
My Question: I need to determine the Y coordinate of the camera, given a width and height of the bounding box, where that bounding box is completely visible to the camera. How could I achieve this?
Thank your for any help in advance!
Answer by stevensandberg1 · Jul 23, 2018 at 01:44 PM
The answer is hidden somewhere between these lines: https://answers.unity.com/questions/393524/check-if-a-mesh-is-fully-visible-to-camera.html and you can check http://www.buythesisonline.org for an accurate solution.
Answer by samsunrock266 · Mar 16, 2019 at 11:20 AM
Thank you for the asking this question and i am surly trying to solve it,,Thank you for asking this question and i am trying to solve it.
Your answer
Follow this Question
Related Questions
Having text be a child to a game object? 2 Answers
Change Camera postion 1 Answer
c# multiple camera help 1 Answer
How do i limit the rotation of a game object in relation to a free following camera ? 0 Answers
How to change camera on Android? 1 Answer