Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

noob: building a character previewer

Discussion in 'Animation' started by Gnaws, Sep 21, 2013.

  1. Gnaws

    Gnaws

    Joined:
    Jul 1, 2008
    Posts:
    43
    To make a long question short, I wanna learn how to make this.

    I'm not entirely helpless as I can set up animations, apply scripts etc. I guess I would classify myself as an Intermediate Unitard. But I just need some extra help in defining the direction required to start building something like this.

    Thx in advance.
     
  2. Gnaws

    Gnaws

    Joined:
    Jul 1, 2008
    Posts:
    43
    So 2 weeks down the road and I'm still clawing for a solution. BUT I'm getting closer!! I now have buttons appearing in my UI.

    Code (csharp):
    1.  
    2. function OnGUI() {
    3.     //background box
    4.     GUI.Box (Rect (10, 10, 100, 200), "Controls");
    5.    
    6.     // first button
    7.     if (GUI.Button(Rect(20, 40, 80, 20), "Hit")){
    8.    
    9.     }
    10.    
    11.     // next button
    12.     if (GUI.Button(Rect(20, 70, 80, 20), "Die")){
    13.    
    14. }
    15. // blah, blah, blah
    16.  
    17.  
    18.  
    NOW I just need to know how to target my character with the animations. Do I control it by calling "animator." that has all the mecanim FBXs?

    Code (csharp):
    1.  
    2. function OnMouseDown(){
    3.     Animator.Play("Die");
    4.  
    5. }
    6.  
    .... isn't working. =[

    Really trying to figure this out on my own.