Hello,
Recently I began learning how to use unity and something that is messing up with my brain is animation.
I learned how to use animator, but I don’t know if some features don’t exit or it’s just me not knowing them and not finding anything about them anywhere.
The most recent one to fry my brain is how to make animations be more “universal” by using proportional scaling.
By that, I will tell the problem I have as example.
I have a 3D menu with 3D buttons and everything. Every button needs to have its own “Hovering” animation (that consists on scaling), but different buttons have different sizes, and in order NOT to make one hovering animation for EACH button with different size, I created an animation via script that doesn’t use absolute values as animations require, but proportions.
So instead of making an animation that changes the scale of a button from:
(1,1,1) → (2,2,2)
I made a script that doubles the previous size of the button, this way I can use this script with every button.
I was happy.
But then the fire nation came and… I had a problem with one of the menu animations not disabling box colliders in time and activating the button animation script while the menu was rotating and making the script animations be kind of “cut” while running and… well… I’m trying to find another approach to this problem.
So, my main question is this one:
Is there a way to make animations (the ones compatible with animators) deal with its variables (position,scale and rotation mainly) proportionally instead of with absolute values?
If not, what is the best approach to deal with 3D menus and buttons using the animator?
Thank you for the patience and for any useful information.