Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by SwampLizard · Sep 13, 2021 at 01:53 PM · verticesboundingbox

Which corners of a boundary box are which?

So, I found a means of getting the 8 corners in an older question:

    boundPoint1 = collider.bounds.min;   
     boundPoint2 = collider.bounds.max;
     boundPoint3 = Vector3(boundPoint1.x, boundPoint1.y,    boundPoint2.z);
     boundPoint4 = Vector3(boundPoint1.x, boundPoint2.y,    boundPoint1.z);
     boundPoint5 = Vector3(boundPoint2.x, boundPoint1.y,    boundPoint1.z);
     boundPoint6 = Vector3(boundPoint1.x, boundPoint2.y,    boundPoint2.z);
     boundPoint7 = Vector3(boundPoint2.x, boundPoint1.y,    boundPoint2.z);
     boundPoint8 = Vector3(boundPoint2.x, boundPoint2.y,    boundPoint1.z);

But what I can't find anywhere, is which are which.

Which is the lower front left corner? The upper back left?


I could try figuring this out through trial and error (and I sorta muddled through), but a quick and easy reference would save me a lot of time in the future. The best I've found so far is from an answer to the same post:

 // top of rectangular cuboid (6-2-8-4)
 // bottom of rectangular cuboid (3-7-5-1)

Which at least breaks it down into two separate squares, with their counterparts (6 and 3, for example) presumably being in the same corner (like front left or back right).

But this is about as far as I've gotten.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by SwampLizard · Sep 14, 2021 at 06:39 PM

Wait I can just draw lines brb

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SwampLizard · Sep 14, 2021 at 06:59 PM 0
Share

Okay, so I realized that I could just draw differently colored lines from each point to some arbitary top/bottom point.

 //From the perspective of the default camera angle looking at a cube at Vector3.zero
 //Cube has rotation of Vector3.zero
 
             nearBottomLeft = collider.bounds.$$anonymous$$;
             farTopRight = collider.bounds.max;
             farBottomLeft = new Vector3(nearBottomLeft.x, nearBottomLeft.y, farTopRight.z);
             nearTopLeft = new Vector3(nearBottomLeft.x, farTopRight.y, nearBottomLeft.z);
             nearBottomRight = new Vector3(farTopRight.x, nearBottomLeft.y, nearBottomLeft.z);
             farTopLeft = new Vector3(nearBottomLeft.x, farTopRight.y, farTopRight.z);
             farBottomRight = new Vector3(farTopRight.x, nearBottomLeft.y, farTopRight.z);
             nearTopRight = new Vector3(farTopRight.x, farTopRight.y, nearBottomLeft.z);
 
 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

166 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can I remove shooted mesh of object? 0 Answers

How to get separated mesh vertices to interact? 0 Answers

[SOLVED] How to convert Mesh from local to World Space? CODE FIXED! 0 Answers

How to calculate the vertices of an icosphere 1 Answer

What to do about long chat boxes? It'll crash if "too many vertices" of txt! 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges