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
0
Question by dqhendricks · Sep 02, 2013 at 11:54 PM · animationtriggercharactercontrollerdamagemesh collider

Does a mesh collider animate?

I am trying to make it so that an enemy will damage a player when it touches the player. The enemy object has a character controller component. The enemy has a child object that has the skinned mesh renderer component, which we will call the model. I added a mesh collider to the model, and set it to be a trigger. I also added a script to the model to log when a hit occurs.

When the enemy swings it's arms to hit the player, nothing triggers. If I run directly in to the enemy, the trigger occurs. This sort of leads me to believe that perhaps the mesh collider is not animating along with the rest of the enemy, and perhaps I have not set it up correctly to do so.

Here is the enemy model, wish mesh collider. alt text

Does the mesh collider animate along with the mesh renderer, or is there a way to make it do so? I need for when the ogre swings it's hand or its weapon at the player, for it to trigger a damage hit on the player. Any help would be appreciated. Thanks!

screen-shot-2013-09-02-at-4.20.36-pm.jpg (113.4 kB)
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
0
Best Answer

Answer by DESTRUKTORR · Sep 02, 2013 at 11:55 PM

To the best of my knowledge, no, and there's a very good reason for that: Performance! Mesh colliders are not very well suited for complex, moving meshes. I would suggest using hit-boxes for various parts of your unit, rather than a mesh collider, which is what pretty much everyone in the industry does XD.

Comment
Add comment · Show 4 · 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 reptilebeats · Sep 03, 2013 at 12:02 AM 0
Share

i second that, try to avoid mesh colliders at all cost, for characters you could simple have several box colliders, hand collider, arm collider and so on. or even just one capsule cllider depending on what you need to do.

i personally mainly only use mesh colliders on terrain

avatar image DESTRUKTORR · Sep 03, 2013 at 05:28 PM 0
Share

Yep, pretty much. $$anonymous$$esh colliders should only be used with terrain, and trees, lol.

avatar image Benjames · May 07, 2015 at 05:28 PM 0
Share

What if I want to get a particular triangle from a raycast? Am I S.O.L or is there a way to temporarily update a mesh collider with an mesh effected by animated bones and weights?

avatar image fabriciopsyko · Jul 20, 2015 at 03:50 PM 0
Share

Finaly a nice answer, I was trying hard to discover how to animate the mesh collider, and now I understand why it is not possible. Thanks a lot.

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

19 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

Related Questions

How to have other (any) Objects smoothly push a Character Controller? 1 Answer

Basic animation key press 0 Answers

How to trigger animations in a script using character controller ? 0 Answers

Animation trigger? 2 Answers

How can I make an enemy hurt the player? 3 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