I’m just trying to figure out if there’s an option in Mechanim, like in the legacy system, that allows you to set the normalized time of an animation clip?
I’ve looked around at a lot of threads but they are old and mixed up with info for the legacy system.
The closest I have got is to use Animator.Play, but that stops any other transitions from working as it always forces that particular animation to play.
It was a really useful feature, surely it must be achievable in the new system!?
If my limited research is correct, normalized time is applying a 0-1 scale to the overall length of the animation? So the end is 1, the dead middle is 0.5, and the beginning is 0.0. Is that correct?
Can you explain what you need normalized time for exactly? That might help identify what part of mecanim can provide a solution.
Yeah that’s the one, the other option in the older system was just to set a clip time with the actual duration of the clip but this just made it an easy 0-1 value.
One example would be if you had a character driving a car or something you could animate a clip of the character steering through left to right then pump your steering angle input into the normalised time of the clip and have a great steering animation hooked into the movement of the vehicle.
Currently i think you would have to do a blend between a couple of key still poses to get a similar effect.
In general though found it useful to be able to modify the time and speed of a clip.
Ahh thanks I missed that!
I think I’m going to go with another solution to this though. I don’t want to have to keep track of the current state and it feels like I’m asking for more trouble using an experimental feature.
Just wondering, is adjusting clip time and speed harder in mechanim because it likes to have full control of that for transitions?
It different.
The animation legacy component is more direct, you have a list of clip which you choose from which one to play from script.
The animator component and the statemachine remove the needs to write code as you code all the logic in a statemachine.
Still you have full control over clip time and speed with Mecanim, but you need to do it in a different way than legacy
@Mecanim-Dev
I have a 3 sec animation (activated by trigger, 2 state: idle, walk). when I disable gameobject in the middle of playing animation and enable it back the animation will stuck on that point. how can I reset to start from beggining ?