Hi does anyone know if Unity 5 allows script access to individual animation state’s speed variables in Mecanim?
This is an age old problem with Mecanim that for some reason Unity still hasn’t addressed even though they acknowledge it is a problem. No use in me downloading it if they haven’t fixed that yet.
Unity 5 is great in many ways but without this oh well for me
… i guess you could have like… X number of “run” states, for each speed ? … but thats kinda lame too, but itd work… unless you have like 100 or something…
thats kinda what i had done before… but not exactly for this… i had different animations
sneakWalk
walk
run
sprint
but yeah… like, path of exile, the character attack animation varies by “attack speed” character stat… which can be like 0.1 to well my character had like 17 attacks per second LOL, it looked ridiculous fast
Yep looks like I’ll have to make a giant tree of different speeds for each attack animation, it’ll look something like this but with way more attacks. I’m going to end up having at least 20 of these, I was hoping for a better way in Mecanim
You could but this is global… as i said i think you could use StateMachineBehaviour and query which state is playing OnUpdate and and change global speed based on this query… not so convenient but i think better than bazillion animations…
StateMachineBehaviour? I just now read the script documentation for it and I don’t see how it could be used to alter the state’s speed, could either of you provide a few more hints? Thanks
I could of course use it to change Animator.speed but that would still interfere with the speed of other layers and animations that are playing simultaneously.