- Home /
Question by
BenjaFriend22 · Apr 04, 2017 at 05:05 AM ·
animationscripting problemanimator
Scale up/down animator not staying at the scale once the animation finishes
I have an animation that scales an object down when it 'sleeps'
When the object wakes back up again, there is a 'wake' animation that scales the object back up to normal.
When the object dies, I also set it's game object as inactive. When it wakes up I set it as active. When it wakes up after dying, the wake animation plays, but the scale does not stay. The object scales back down to 0 after the animation for some reason.
Here is my animator component on the object
Is there a better way to set something so simple up? Right now I am just saying in my script:
anim.SetTrigger(sleepAnimationTriggerName);
Any ideas?
anim.png
(27.6 kB)
Comment
Best Answer
Answer by BenjaFriend22 · Apr 05, 2017 at 12:42 PM
I had to un-check the 'Write Defaults' box in my 'Idle' state.
anim-answer.png
(18.7 kB)