Using new animations



  • Hello,

    Just wanted to say I love your kit but I've run into one problem...

    I'm not much of a programmer so I've taken it step by step to see your code and how you've done things but for some reason I cannot for the life of me get a new animation to work on a custom tower that I've created.

    I've gotten everything else to work so far, importing it into the game, getting it to fire/rotate... but animations will never actually go off...

    Any ideas on what could be causing the problem? I don't get any errors, the animations just don't work.
    Do you need more to take some screenshots to show you?

    Thanks
    Drew



  • Hey Drew,

    if your tower has animations, they should show up in the "Animations" tab  on the model file. Set the animation tab on the tab "Rig" to legacy, in case it's something else (docs).

    You should now be able to see the animation clips in the hierarchy of your model (or not, if you are using separate animation files created in Unity). Your tower needs an Animation component to play these animations. As an example, see the Adv_protoTower1 under Examples > Advanced > Prefabs, which has an Animation component besides the TowerBase/Upgrade script. Assign your clip(s) to this Animation component and make sure to disable "Play Automatically". Lastly, assign your clip to the Idle/Shoot Anim variable in the TowerBase script.

    I hope this helps. If you still experience any issues, you can also send me your tower model via email and I'll take a look.



  • Oh thank you for the quick reply.

    I think I've gotten everything set up correctly... I think my problem MIGHT be the organization of my animation.

    I noticed in the animation folder you have set up with the advanced scene that the firing animation is "by itself."

    The animation I have setup for my tower is a child of the tower model that I created.
    So it looks like

    Bubble Tower
        - Geometry
        - Blah blah blah
        - Blah blah blah
        - Blah blah blah
        - ANIMATION  <- what I'm trying to use

    Would this cause it to be an issue?
    Is there a way to unparent this?  I've tried everything and no matter what I do it won't unparent.... if I drag it off it just takes the entire model.

    Sorry for the newbie questions, I'm trying to hard to learn Unity but there are quite a few obstacles, haha.
    Thanks!
    Drew



  • I noticed in the animation folder you have set up with the advanced scene that the firing animation is "by itself."

    I created the animation directly in Unity via the Animation Editor, that's why there is no dependency to the tower itself. The animation could even be used on other towers with a similar structure.

    Is there a way to unparent this?  I've tried everything and no matter what I do it won't unparent.... if I drag it off it just takes the entire model.

    I guess you've animated your tower in your modelling application, so the animation is a part of your tower (and cannot be detached). This shouldn't be an issue and is actually the usual way of doing it. Have you tried to play the animation manually (without any scripts) and did it play correctly? Could you please send your tower prefab and model (or a representation) to info [at] rebound-games.com for me to investigate.



  • sent the email!

    Thanks again sooo much for your help, you have no idea how much I appreciate it.


Log in to reply