• 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 youngapprentice · Jul 10, 2013 at 05:04 PM · animationmaskavatarmechanim

Mechanim Issue

All righty. Here goes nothin'

So! I am very familiar with Unity's original animation system and am trying to make the transition into Mechanim. So far, it's great! I'm just confused on a couple things.

  1. I see that you can create a separate animation layer and mask it. This would allow me to, say, both walk and carry somethingat the same time. Great! But why, then, if I can create Avatar Masks, would I have another option for a Transform Mask in the animations import panel? What do I use that for?

  2. I have two animations for my space ship currently. One is an Idle animation that simply translates one parent bone up and down. My other animation, the Hatch Open animation, swings open doors on the ship. I have the Hatch open animation set up in another animation layer with an Avatar Mask masking just those two bones, set to play when a Bool is set to true, and then play in reverse right after that finishes. Easy enough! My problem is that when I press play, the hatch is open! What's up with that? It looks as if the hatch automatically starts on the last frame of the hatch open animation! Could it be linked to the fact that I'm reversing it after it plays the first time?

Any tips on using Mechanim are absolutely accepted. I understand that it is a robust system and I would love to effectively use it to my advantage.

Thanks, all! - YA

BTW, I love how in the suggested tags section, it suggests that I add the tags 'Come Back' and 'Help Me Please' and 'Another Script'...

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 youngapprentice · Jul 10, 2013 at 06:18 PM 0
Share

Also, is there a way for me to get an animation to play just once ins$$anonymous$$d of having to set a bool to true and then somehow setting it to false later?

avatar image Griffo · Jul 10, 2013 at 06:37 PM 0
Share

This is how I play a animation only once .. yield waits for 1 frame then sets the boolean to false.

 anim.SetBool("Reload", true);
 yield WaitForSeconds (0);
 anim.SetBool("Reload", false);
avatar image youngapprentice · Jul 10, 2013 at 09:30 PM 0
Share

Hey, that worked really well! Thanks for that! Any insight about the transform mask on import or the weird effects other animations have on non-keyframed bones?

avatar image youngapprentice · Jul 21, 2013 at 12:35 PM 0
Share

No joy? I let this thing cook for a while and got nothing. Is there something I am wording incorrectly?

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

16 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

Related Questions

Mechanim - should be simple, but... 2 Answers

How can I make my gun move with the avatar mask? 0 Answers

Error : Mask does not match hierarchy unity3d / Animation might not correctly 0 Answers

Avatar mask not working 1 Answer

How to use a locomotion blend tree (Walking) while also swinging a sword (With only upper body)? 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges