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 /
  • Help Room /
avatar image
0
Question by t9s1n2 · Jan 29, 2016 at 10:19 AM · animationblenderrigging

Animations Imported From Blender Get Stuck In a RPG.

I'm using the legacy animation type. I rig my characters in Blender.

If i set the attack speed too high then the attacking animation has a chance to get stuck.

Sometimes enemies also get stuck even with low attack speed.

The type of code for animations i use is this. I use GetComponent().Play("Attack"); to start an animation.

 if (attack == 1 && GetComponent<Animation>()["Attack"].time>0.9*GetComponent<Animation>()["Attack"].length) 

It checks if the player is attacking and if the time of the animation is higher than set then it creates an attack projectile, for example and sets the player to not attack. If not attacking then the player and enemies can usually move or start another attack.

What are reasons animations could get stuck and how to fix them? Is there maybe a better way to check, if animations are done playing?

Comment
Add comment · Show 4
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 incorrect · Jan 29, 2016 at 10:19 AM 0
Share

What do you mean by 'animation is stuck'?

avatar image t9s1n2 incorrect · Jan 29, 2016 at 11:02 AM 0
Share

After attacking attack = 1. It basically gets stuck in attack = 1. The time of the attack gets stuck at 0, I checked by debugging. The player can't move or do anything at that point because attack = 1 and you can only do stuff, if attack = 0. The animation might finish before the time is past 90%. For some reason it skips to the end of the animation and then resets the time to 0. Sometimes right after attacking it gets stuck.

avatar image t9s1n2 t9s1n2 · Jan 29, 2016 at 04:49 PM 0
Share

This is what might be causing the problem but i'm not sure how to fix it. When the enemies are not visible to the camera then they are not animated correctly. I need them to also attack when they're not visible. It looks like they get stuck when they are not visible to the camera. The animation timer gets stuck from what i've seen debugging.

avatar image t9s1n2 · Feb 10, 2016 at 04:53 AM 0
Share

Animations seem to also freeze when the game is processing many things. I think i might need a coroutine but i have no idea how to set it up for animations.

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

Blender rigged empties, 0 Answers

Blender animations using multiple armatures not functioning properly 1 Answer

Rigging af 2D character, so the feet is the root 0 Answers

Animation in Blender or Unity? 0 Answers

Trouble with Humanoid Avatars 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