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 alsatian · Jan 16, 2016 at 04:26 PM · animationanimatoranimator controllerragdollmechanim

Get weird issue when change from Mechanim -> Ragdoll

Hi,

Please see my issue in this video: https://youtu.be/Ml6r4TYZEyA

As you can see in my video:

Enemy: at normal state, it behaves exactly like I control (via scripts and Animator). When it dies, scripts and Animator will be disable/ removed immediately. The enemy will look like a real dead body (thank to Ragdoll)

Issue: I have 2 enemies (let's call them A and B). They are from the same prefab.

(1). If B is created after A is destroyed then everything is fine

(2). But if B is created after A is created AND before A is destroyed, then when B is destroyed, its Animator behaves really weird (as seen in the video)

Of course, this also happened when I have more enemies.

I did look carefully through the code, and I think (2) happened because A and B somehow share the same Animator controller/ avatar, so when B is destroyed, it starts to use the Animator controller/ avatar from A (which is falling really fast; or was destroyed); hence the weird result. This does not happen in (1) case, remember?

(I did not use any static variables/ void,..)

Do you know how to fix this? Thank you so much

Comment
Add comment · Show 1
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 _dns_ · Jan 16, 2016 at 06:16 PM 1
Share

Hi, it sounds like you are modifying the prefab itself ins$$anonymous$$d of an instance of this prefab. Well, I guess, it's easy to do this mistake and it could have the effect you describe. $$anonymous$$aybe double checking the code to make sure no prefab is modified. Also, displaying the ID (using GetInstanceID() on $$anonymous$$onobehaviors or GameObjects, and Debug.Log) can help. The inspector can also show this ID using the "debug" mode (right click on the inspector tab and choose "debug" to display additional fields). Doing this, you can make sure the object/animator that is destroyed/modified is the right one and not a prefab by checking the IDs.

0 Replies

· Add your reply
  • Sort: 

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Can animation clips be swapped out of the animator override controller in runtime? 1 Answer

Ragdoll and Animator 0 Answers

Why do my animations only play once? 1 Answer

How to change animation clips of an animator state at runtime? Is there a way? 5 Answers

Animator Layer executes when weight equals zero 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