• 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
Question by mephistonight · Jan 06, 2017 at 01:02 AM · rigidbodyvrmesh colliderprecisionconvex

Practical examples of mesh collider work arounds?

I'm new to Unity. I have read through documentation and forums but haven't found a precise answer to my scenario below so please be kind!

I'm making a VR game with objects players need to be able to interact with in a precise (down to the millimeter) way. For a player to be able to pick up and interact with objects they need to have rigid bodies and colliders (interaction script requires it). I can't use basic colliders as the player requires the objects to collide with each other in very price ways. Imagine a cylinder facing vertically upwards and a torus being placed over the cylinder very carefully so that the cylinder only just fits in the torus' central hole without touc$$anonymous$$ng the sides. Convex is therefore not possible.

Obviously I can use multiple basic shaped colliders but I'd need so many of them to create an accurate shape of the inside of the torus that I suspect performance would be too poor, especially for a VR game.

My question on the above scenario is, am I missing somet$$anonymous$$ng obvious? Are people really making tons of basic collider shapes for animated characters, or a space s$$anonymous$$p flying through a tight space between a hole in an asteroid? Can anyone provide practical examples of how they have solved t$$anonymous$$s problem without a labour intensive workflow? There are so many examples where one would need precise collisions on objects I feel I must be missing somet$$anonymous$$ng stupidly obvious?

Many thanks for your help in advance. I've tried to solve t$$anonymous$$s myself but have $$anonymous$$t a brick wall.

Regards, Paul

Comment

People who like this

0 Show 0
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

Answer by mephistonight · Jan 11, 2017 at 04:27 PM

In case anyone else stumbles across t$$anonymous$$s question and wants to know the answer.. here is the best I could come up with myself.

The short answer is, yes you do have to manually add lots of primitive colliders when you're looking for precise collisions on a complex mesh. However, compound colliders are a reasonable solution for me at least (link to the manual Rigid body). Ignoring the labour intensive manual work-flow, it's worth keeping in mind that compound colliders make multiple primitive colliders less of a problem for performance... certainly less of a problem than lifting the 250 vert mesh collider limit would have if Unity allowed it.

After creating a torus and manually rotating and transforming lots (95) box colliders so the torus' faces were all covered, collisions are spot on. Though I had to double t$$anonymous$$s number so I could have one set of colliders as triggers (playing an audio clip) and then a second set as non-trigger colliders so that the parent torus collides physically, rather than passing through other game objects. T$$anonymous$$s is because I only wanted to play the audio if a particular gameobject tag was colliding, trigger colliders don't physically collide and OnCollisionEnter is passed the Collision class and not a Collider. i.e I couldn't see a way to find out the object tag of the object colliding with the torus through OnCollisionEnter. T$$anonymous$$s may be me needing to brush up on C# though.

In any case, it ended up being a lot of colliders needed for one game object! I couldn't find any change in frame-rate though, so I stopped worrying about performance.

T$$anonymous$$s discussion on collider issues is also worth reading.

For anyone else making VR games and wanting to speed up the work-flow, I'd recommend keeping an eye on the Unity 5.6 beta. The VR editor looks awesome.

Comment

People who like this

0 Show 0 · 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

119 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

Related Questions

Imported Model with Generated Colliders (Convex) problems 1 Answer

VR physics issue 0 Answers

RigidBody FPS Controller(standard assets) gets stuck on mesh colliders 3 Answers

Need help with two Configurable joints ! (Two hands grab in VR) 1 Answer

Character/Avatar on XR Rig help 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