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 DMCH · Dec 01, 2014 at 03:14 PM · animationtransition

Managing Animations & Transitions

Hi,

I'm fairly new to handling 3d animation in Unity, and am looking for some advice on how to organise a large amount of animations and transitions. The animations are played through events in the code, rather than through key inputs. I've watched the tutorial on mechanim animation.

Currently, I'm trying to manage the transition between playing a melee animation and returning to a fighting stance when the melee animation is complete. The melee animation is triggered through code, and all melee animations have a one way transition to the blend tree which contains the fighting stances. The blend tree has a parameter DefaultFightingStance, which is linked to the character's script. This works, but it's very disorganised (see screenshot). Any suggestions on how to organise this? Also, any good reading on the topic would be appreciated. Thanks

alt text

animations.jpg (137.7 kB)
Comment
Add comment · Show 2
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 Baste · Dec 01, 2014 at 04:42 PM 1
Share

How does the fighting system work? Advice is kinda dependent on that.

Is this a combo system? Are the moves selected at random? Are they context-dependent in some other way?

No matter what, you probably want to set up some sub-trees that's organized by attack type.

avatar image DMCH · Dec 01, 2014 at 05:05 PM 0
Share

It's turn based on a grid with square tiles. When the player or an AI makes a melee attack, a call is made to rotate to target -> pause -> animate the attack.

These are just single animations per attack. Currently, the animation clip is selected (through code) based on whether the attack is to a diagonal or orthagonal tile, and depending on whether the attack hits or not, an appropriate hit/dodge clip will be played. Haven't gotten that far yet, though. Cheers!

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Mmmpies · Dec 01, 2014 at 07:49 PM

Probably a good idea to put them in layers. So you have a layer for normal movement, a layer for attack a layer for Swimming or whatever:

alt text

Keeps it neater to look at and easier to break the character actions down. So the first one is the Base layer and this next one the swimming.

alt text

And reading, well there's the Unity manual and google "mechanim tutorial" will get lots. Really it depends how you prefer learning. For me I'd rather type that search in YouTube and watch a half hour video but mechanim isn't that difficult just takes a while to get your head round.

Looks like you've already got quite a bit done already, just needs tidying up.


mechanimswim.png (50.2 kB)
mechanim.png (42.9 kB)
Comment
Add comment · Show 3 · 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 Mmmpies · Dec 01, 2014 at 09:48 PM 1
Share

Of course these are for my game with yours you'd break down layers to whatever the primary attribute it is that you call first. So if you base it on attacking head create a head layer and do all your attacks for head in there. If you're not sure what I mean just let me know and I'll try and explain more but without knowing your system it's hard to tell.

avatar image DMCH · Dec 02, 2014 at 02:00 PM 0
Share

Yes, have checked out the mechanim tutorial, and it helped me along a bit. Can't quite find anything similar to what I need, but will keep looking.

I'd like to try calling the attack animations through code (Animator.Play) and set up transitions in the animator window to smooth the model's position between attack end and fighting stance start. I don't think I'm doing this correctly, though. Think the issue might be with using a blank state (FightStanceSwitch) and a parameter (default fight stance) to choose the correct fight stancealt text

This is the base layer, where all the attacks transition to (FightStanceSwitch). alt text I've clearly got something wrong here with the sub state machines, any suggestions?

animationsubstates.jpg (201.1 kB)
baselayer.jpg (52.9 kB)
avatar image DMCH · Dec 02, 2014 at 02:34 PM 0
Share

Heh, never$$anonymous$$d... I figured out how to transtion to a specific animation located in a different substate. For anyone else in the same position, one way of transitioning between animations in different substates is to make the transition directly between the animations within the substates, and apply the parameters which will deter$$anonymous$$e which animation in the substate to play.

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

28 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

Related Questions

Is there a way to turn on a transitions hasExitTime on/off through code? 1 Answer

Nicer Mecanim transitions? 1 Answer

Create animation transitions via script. 0 Answers

Talking animation with phonemes smooth transition 0 Answers

How to make a transition animation, intermediate animation between two main states 0 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