Search Unity

Animator Bug?

Discussion in 'Animation' started by ambe, Nov 19, 2014.

  1. ambe

    ambe

    Joined:
    Mar 10, 2014
    Posts:
    1
    Hi,
    So I'm having this problem with the animator in unity, I used it to animate my character. You know make a set off boxes use some transforms as pivots, save - easy no stupid bones required right. Well maybe this is stupid and i shouldn't be using the animator for this. I guess thats my first question;

    1. Should i use the unity animator for character animation? - is that fine ? performance?

    Secondly, this worked fine, great actually. Flexible easy to change and to create new animations on tha fly, as it were. Well, problems; the player works fine(while standing in the original orientation of recording the animation), in all aspects. everything is as it should. Trigger animation(using triggers not bools- sould'nt be a problem, right?), guy falls all is well. If i however decide to copy the character and turn it a 180 degrees to face my player, S*** gets wierd. Sometimes the animation works as planed other times it makes the whole character flip around and face the other way. The dude then proceeds trough his frames the opposite way. I must stress that this is not always the case, some times it works as intended keeping the dude facing my player and granting my wishes. It seems random which animation sets this off. I would understand better if it wasn't such an unreliable occurrence. I have not animated the rotation of the GameObject itself or its position, or at all. In addition when I play the animation back, in the scene view, everything is peachy.

    2. Why does my GameObject randomly change orientation triggered by my character animations, animations that I made in unity animation editor. Is it a bug with unity ? or with me?

    If anyone have encountered this before let me know,
    I may be an idiot ignoring basic unity principles, if so let me know. I can take it! ;)


    Edit: Turns out I'm the idiot it seems, story of my life. I'll leave this here partly to punish my self, partly in a hope to get question one answered. The awswer to my mystery ? lurking deep in my code a brain fart ; transform.parent.eulerAngles = new Vector3(0, 180, 0); so naturaly it works one way not the other. the irregularity was due to the uniqe circumstances making the function trigger.

    Better question in addition to number one, is there possible to mask out animations when doing things like this? I can get the transforms trough the original model avatar. but that does me no good.
     
    Last edited: Nov 20, 2014