Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
2
Question by Uriel_96 · Mar 09, 2011 at 02:14 AM · animationcollidermeshmodelmeshcollider

Make mesh collider constantly change

OK, I have a model that has a mesh collider but the problem is that when I do an animation on the object the mesh collider doesn't change, so I will like to know how to constantly change the mesh collider so the mesh collider is the same as the mesh

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
2
Best Answer

Answer by Peter G · Mar 09, 2011 at 03:24 AM

You don't. The performance hit from constantly changing the vertex data in a mesh collider is such that it is never a good idea.

Unity will let you change the mesh used as the collider, but the mesh will not be deformed by animations. It wouldn't be a good idea anyway since you would have to recalculate all sorts of things in Physx for collisions.

Instead use a collection of primitives so that is encapsulates your entire object. Very similar to a ragdoll minus the rigidbodies and joints.

Comment
Add comment · Show 5 · 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 Eric5h5 · Mar 09, 2011 at 03:50 AM 0
Share

Since there's no access to animated skinned mesh data from the GPU, indeed animating a mesh collider is impossible. (You can manually update a mesh collider from a non-skinned mesh where you change the vertices yourself, but it's extremely slow.)

avatar image Uriel_96 · Mar 09, 2011 at 09:50 PM 0
Share

Good idea, but my game is getting complex and lets I don't want to use what is simple. To have an idea, in my model is necessary to use mesh collider because I want to make it more to real life, that means, if I use a capsule it would not be exactly the same, so in this case I prefer to use meshcollider and make it move with the mesh even if is very slow

avatar image Peter G · Mar 09, 2011 at 10:54 PM 0
Share

Well, since Eric confirmed my initial thoughts, you can't. :(

avatar image Eric5h5 · Mar 09, 2011 at 11:03 PM 0
Share

@Uriel: you don't use a capsule, you use a collection of primitives like Peter G said. Updating a mesh collider in real time is too slow to be usable even if it was possible.

avatar image Uriel_96 · Mar 09, 2011 at 11:13 PM 0
Share

O$$anonymous$$ thanks both Peter and Eric for the clarification and answer, I think I will need to find another substitute of collider

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

No one has followed this question yet.

Related Questions

Workaround to Non-Convex mesh colliders with non-Kinematic RigidBodies? 1 Answer

Problem with collision detection in an animated object 1 Answer

Cinema 4D mesh collider only generates mesh on exterior of object 0 Answers

Colliders on this spider 1 Answer

I can stand on top of my cave model but fall through upon enter 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