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 Salamani · Aug 24, 2015 at 10:18 AM · animationscripting problemanimatoranimator controlleranimations

Confused about animations

I've tried searching around and I find some answers which never seem to explain this to me fully. Some are simply outdated and others don't explain what's happening.

What I want to know is what are my options when making animations?

  • Can I make animations directly in unity (using the "Animations" component)?

  • When making animations in 3d software (I use Blender), how would I go about animating and scripting (C#) different weapons and such?

How does the animation scripting go? I've seen some examples that are simply animation.Play(), which doesn't seem to do anything and doesn't really make sense to me and others which have got to do with the "Animator" component. I'm using C#, if that wasn't clear by now.

A little insight into what I'm doing right now: I'm doing a little test project, I've scripted a first person Rigidbody controller and made a simple axe using the in-engine shapes. What I'm looking for is animating the axe to do a chopping animation when I hit left click. I also want to set it up so I can switch between weapons and/or tools and have an animation on the rest of them as well.

Complicated answers are fine as this project is aimed at improving my skills and knowledge with unity and C#, all I want to ask is for a detailed answer or documentation which explains the process used.

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

Answer by Baste · Aug 24, 2015 at 12:56 PM

First of all: You can make animations directly in Unity with the Animations window. It's sufficient for things like moving doors or platforms, but if you're trying to animate a character, you'll need to get an actual animation program rather than trying to use that. It's simply too simplistic to get something like a decent walking animation done without a ton of extra work.

Unity used to base animations on the Animation component. Development was stopped on that in favor of the animator component. There have been several discussions (read: tons of flame wars) over if that was a good idea or not. Unity internally considers it to be deprecated. That does not count for the Animation window - just the component. Yes, this is confusing.

The old Animation component was simply a list of animation clips. You sent it the name of the clip it should play from your script, and that was it.

The Animator, on the other hand, is a wrapper around a state machine setup. You create the state machine (an Animator Controller), use the Animator window to mess with it, and an Animator component to use it. You transition between states from scripts by sending trigger messages and setting variables on your animator.

You should read through this part of the docs, as it goes into depth on all of the components and how they work.

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 Salamani · Aug 24, 2015 at 01:35 PM 0
Share

That's very informative, I know a little bit around the Animator in Unity, but I should probably read it more thoroughly. I've used blender to create a very simple humanoid and animated it using Blender animations and then using Animator to get the movements I want. Since the Animator seems to be the best option, the question that I have now is about the part with multiple weapons or tools. When I have multiple items that I can switch between, how would I go about animating them? Should I use my model in Blender and animate them as if the model was holding them and then export the whole thing with multiple different item animations in a long animation sequence or is there a simpler way to handle that?

avatar image Baste · Aug 24, 2015 at 05:20 PM 0
Share

If you can get away with the same animation for different tools, simply create the animations without the tools (or with a placeholder tool), and then attach them to the hand bone in the correct orientation and rotation. Use scripting to set which tool is currently active.

You could also create the animations in a way where your characters are holding all of them at the same time, and then deactivate the ones you're not using.

avatar image Salamani · Aug 24, 2015 at 07:18 PM 0
Share

Oh, that's actually really clever. I think I got my answer. Thank you so much! :)

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

26 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

Related Questions

NEED HELP ANIMATING PLAYER MOVEMENT 0 Answers

How do I rotate specific joints/bones using a script? 0 Answers

Using same animator for multiple game objects 0 Answers

Animation changes when marked as legacy 0 Answers

Can't play an animation from the Animator 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