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 Kingofweirdos · Jul 18, 2017 at 09:01 PM · noobmeshcolliderstupid

Extending a mesh collider/Other issues using mesh collider

Hello I have a Mesh collider set p on a object that when it falls is supposed to touch the ground but whenever the mesh collider is activated the object falls straight through the ground yet if I use a box collider it works perfectly fine. Also I would like to know if there was any way that I could get the mesh collider to protrude by 1 unit from the actual object.

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
0

Answer by shadowpuppet · Jul 18, 2017 at 10:03 PM

Mesh colliders don't seem to handle collision as well as the other types. When I do use a mesh collider and want it to be bigger than the object mesh I just scale that object mesh up a little ( in a 3D program) and use that for the mesh collider rather than the object mesh

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 Kingofweirdos · Jul 19, 2017 at 05:08 AM 0
Share

Any suggestions on a 3d program @shadowpuppet

avatar image
0

Answer by Bunny83 · Jul 18, 2017 at 10:14 PM

Two non convex mesh colliders can't collide with each other. Non-convex mesh collider should only be used for static colliders that do not move. If you want / need to use a mesh collider on a moving rigidbody you should mark it as convex. Keep in mind that a convex mesh collider will use the convex hull of the mesh and not the actual mesh.

If possible you should use primitive colliders (box, sphere, capsule) on moving objects. Keep in mind that you can use multiple colliders for a single rigidbody.

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 Kingofweirdos · Jul 19, 2017 at 05:10 AM 0
Share

@Bunny83 Sorry I didn't understand the last bit "$$anonymous$$eep in $$anonymous$$d that you can use multiple colliders for a single rigidbody" do you mean we can have multiple objects and then only 1 needs a rigidbody and the rest don't ? Why does that relate to mesh colliders? Also is there any easy way to set up multiple colliders to create one object or do we have to do it manually?

avatar image Bunny83 Kingofweirdos · Jul 19, 2017 at 10:55 AM 0
Share

Yes, you can use several child objects with primitive colliders and a rigidbody on the parent will use them. A rigidbody generally uses all colliders in any child objects. This is called a compound collider. See the middle section on the Rigidbody manual page.

$$anonymous$$eshColliders are quite heavy to compute. Primitive colliders are defined as mathematical volume so it's much easier to calculate intersections. The collider of an object usually doesn't need to be too detailed. $$anonymous$$eep in $$anonymous$$d that they just handle collisions. The user never "sees" them.

Note that $$anonymous$$eshColliders have quite a few limitations. As already mentioned non convex mesh colliders can only be used for static geometry (without a rigidbody). Convex mesh colliders are limited to 255 triangles. In most cases a few primitive colliders are enough.

Even most FPS games which might use something like a mesh collider for the world, they usually use a more simplified collider to avoid edge cases. So stairs might be covered by a simple ramp collider to avoid getting stuck. Here are two cases from the game Doom3: Tris / Collision and Tris2 / Collision2

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

72 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

Related Questions

can ContextMenu pass arguments into a method? 1 Answer

I Accidently Deleted My Editor File In The Assests What Do I Do? 1 Answer

MeshCollider is not getting updated when adding vertex to mesh 1 Answer

AddComponent(MeshCollider) not working on Android/iOS 0 Answers

Cutting mesh colliders; Does Unity do culling automatically or do I make my own code? 2 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