mecanim

hi,

imagine a simple scenario :

three balls with each its own animation (a simple bone going downward) IMPORTED as a fbx.

i’d like to fire animation individually on each ball.

so i set the Rig option to Generic and then created a Controller (state machine).

but now what should i do to achieve the following :

  • i click on the left ball and it falls down (plays its anim)
  • i click then on the second, it falls down (plays its anim)
  • and i click on the 3rd and it falls down (plays its anim)

how can i achieve that with mecanim ?

I’d do this: Make two states in you animator, the first one is the default idle state, I think you can put no animations in there, not 100% sure. Then do a second state “falling”, put you falling animation inside, then do a transition from idle to falling. Add a bool parameter “isFalling” and add it to the transition. Then make a script like that (pseudo code):

if (clickOnBall1)
ball1.animator.SetBool(“isFalling”,true)

Finally fix all the bugs :wink: