Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
avatar image
0
Question by Hijackedbrain · Jan 07, 2016 at 10:07 PM · cubedetectionrectgeometry

How to detect if an object is above another one

Hello,

I'd like to know if there is a way to detect if an object is above another one. But please keep in mind that I'm working in a 3D Space, raycast is a "no no" it would cost too much to cover the whole surface, and add a collision box would be a bad idea because of reasons (too long to explain here) .... Also, my objects are both rectangulars. So basically I was thinking about "creating" a Rect on the top surface of the object below and then use Rect.Contains ( http://docs.unity3d.com/ScriptReference/Rect.Contains.html ) and project the origin of the other cube on my Rect. But I know it's stupid but I can't figure out how to correctly instantiate the Rect.

So please help me figure out how to instantiate Rect, or tip me another solution. Thanks for reading, and more thanks to whoever will respond.

EDIT: ok so by the time this question has been moderated, I figured out I could use the bounds.Contains of my object below instead of creating a Rect. Also, it took easily 30+ hours to moderate this question... seriously what takes so long? I know it's free community yadi yada but guys... why ? stackoverflow works great without this moderation step. No anger, just trying to understand.

Comment
Add comment · Show 2
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 meat5000 ♦ · Apr 13, 2016 at 11:22 AM 2
Share

We dont live here and theres a handful of us. UA doesnt work without moderation. Too much horse-shit co$$anonymous$$g through all the time.

Taking a day to moderate helps people to have the patience to learn to fix their own problems rather than be told an answer and learn nothing. I mean really, it takes people weeks upon weeks to figure out they can just put a few words in to a search engine and get thousands of answers (in most cases), preferring ins$$anonymous$$d to ask us to read a page from the manual to them because they are too lazy to read it themselves.

Its the reality.

avatar image Ali-hatem meat5000 ♦ · Apr 13, 2016 at 11:32 AM 0
Share

@meat5000 there is something else really annoying some unqualified people are missing around with there wrong & untested answers so cheek this answer which is marked as best answer ! cheek this

0 Replies

· Add your reply
  • Sort: 

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

6 People are following this question.

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

Related Questions

Constructive Solid Geometry on procedural pipes 1 Answer

check if two colliders Rub against each other 1 Answer

Detection if a GameObject is below you or next to you? 1 Answer

How to set thickness to terrain plane 2 Answers

Possible to create primitive cube offset from own origin 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