Comments and answers for "max size of a cube at irregular angles"
http://answers.unity.com/questions/1606495/max-size-of-a-cube-at-irregular-angles.html
The latest comments and answers for the question "max size of a cube at irregular angles"Comment by Superstition on Superstition's answer
http://answers.unity.com/comments/1606853/view.html
I want to measure a object. I want to be able to measure it at any angle. I have a bounding box and a direction. I know the standard width, height and depth of my bounding box. But what if I want to know how long it is at a different angle? If I stab a spear, at a random angle, through a box, how much of the spear is inside the box?Wed, 27 Feb 2019 02:30:19 GMTSuperstitionAnswer by dan_wipf
http://answers.unity.com/answers/1606538/view.html
@Bunny83 Well I guess he want's the actual Size in 3d Space. So the easiest way is to get the Renderers BB's.(World Space)
<br>
to get the Actual Size simply do this:
<br>
Vector3 ActualSize = GetComponent<Renderer>().bounds.size;Tue, 26 Feb 2019 07:32:25 GMTdan_wipfAnswer by Bunny83
http://answers.unity.com/answers/1606517/view.html
It's not really clear what you want to know exactly. However the Bound is an AABB (Axis Aligned Bounding Box). So it's always aligned with either the world space (in case of Collider.bounds or Renderer.bounds) or aligned with the local space of the object (in case of Mesh.bounds). To calculate an arbitrary bounding box you would need to iterate through all vertices of the object and transform them into your desired space / orientation and calculate the bounding box there manually.
<br>
It's not clear on what information you want to base your calculations on. In your screen shot you've drawn your purple line in screen space of the editor camera. So you should try to be more precise about your usecase and what you need this for.Tue, 26 Feb 2019 05:19:26 GMTBunny83