- Home /
Using Animator Controller to smoothly scale an object?
I have an object to which I want to reflect a state change with a visual adjustment - in particular, when the state changes I wish to have a subobject on that object scale up and when the state changes back I want it to scale back down. It seems like an Animator Controller is the right tool for this. So I set up a simple state machine with two states, each of which is a single-frame animation which specifies the target scale for the subobject. I then setup transitions between these two states to trigger on a boolean property and take 5 frames. I expected what I'd get would be that during those 5 frames, the scale would smoothly change; however, instead I get the scale snapping at the end of the transition.
Am I giving transitions too much credit here, can they not do this kind of thing? If not, do I need to make intermediate states which specify the 5-frame scaling up/down? (That would seem like it should work for my current 2-state setup but I am worried that in the long term that would be tough to manage with more states and possible transitions).
Thanks in advance!
Your answer
Follow this Question
Related Questions
Transitions from blend tree never work 0 Answers
Is it possible to use multiple parameters causing different transitions between two animations? 0 Answers
animations as transitions to other animations 2d 0 Answers
How to access and modify an animator state transition in runtime? 1 Answer
unity animator transition keeps transitioning to beginning of animation 2 Answers