• 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 TSRajesh · Dec 06, 2014 at 05:24 PM · collidernormal

Box Collider Normals?

Hi,

Just curious if we can set the normals of a box collider. My scenario is that i created my house in blender and imported into unity. And i have to place box colliders on each wall. (Either that, or mesh collider.. if it is cheaper) I was wondering if i can put a single box collider per room, so that i am "inside" the collider.. the collider's normals are turned "inside" instead of "outside"?

On a secondary (related) question, Does having several box colliders impact performance? I mean, is there a performance penalty just "having" all those colliders, not exactly colliding into it?

Thanks Rajesh

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

2 Replies

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

Answer by MrSoad · Dec 06, 2014 at 05:49 PM

Hi, you cannot turn the collider inside out. Also Mesh Colliders are not cheap, stick to primitives wherever possible. Don't worry about having multiple Box Colliders, games are mostly built out of many primitive colliders like the Box Collider. Use one for each wall, floor etc (Do not make them or your walls too thin. This can result in objects passing through them with relative ease).

Comment
Add comment · Show 2 · 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 Madeck · Dec 06, 2014 at 06:03 PM 1
Share

Remember also that two mesh colliders cannot interact together, and that back face culling is applied.

http://docs.unity3d.com/$$anonymous$$anual/class-$$anonymous$$eshCollider.html

avatar image MrSoad · Dec 06, 2014 at 06:30 PM 0
Share

Yep good points by $$anonymous$$adeck, especially about two mesh colliders not interacting!

avatar image
0

Answer by Madeck · Dec 06, 2014 at 06:01 PM

Indeed as @MrSoad pointed out you cannot turn a collider inside out. The way I’ve dealt with the situation before was to create a simpler mesh with the correct normals and add a mesh collider to it and no renderer. This way you have both a rendered geometry and a collider geometry, so it might be little harder to maintain.

Comment
Add comment · 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

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

27 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

Related Questions

detection cube face while rotating 0 Answers

Collision normal angles. 1 Answer

RaycastHit.Normal for Meshes? 0 Answers

Is there a cheap way to flip a collider´s normals in real time? 0 Answers

Internal collisions 1 Answer


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