- Home /
Unity 5.5.0f3 animation backwards
I have been crawling the web for a few days now, mostly finding dated answers regarding the legacy animation system.
I'm making a hololens-app, where an animating object can be manipulated to change the animators speed (slow down, speed up, both forwards and backwards). I can't figure out how to make that work with negative speeds even though I had it working last week before losing local progress and for the life of me I cannot reproduce it.
Guess that's why Collaborate is in beta :^)
Here is my code as-is:
private Animator anim;
//...
anim = gameObject.GetComponent<Animator>();
//...
public void OnManipulationUpdated(ManipulationEventData eventData)
{
if (anim.isActiveAndEnabled)
{
anim.speed = eventData.CumulativeDelta.x;
anim.Play("KA_Cover_Anim");
return;
}
//...
}
I read before, that it is not possible since 5.0 to set Animator.speed to negative values, but I'm 90% sure that was part of how I did it before it broke, not sure what else there was to it.
As said this has been asked before, but almost all answers are pre 2016 or asking where to find the setting in the inspector, not how to access it at runtime.
Your answer
Follow this Question
Related Questions
Duplicating and Tweaking Mecanim 2D Animations 1 Answer
Mecanim animation clip length works in editor but not in player 0 Answers
Is it possible to disable Mecanim at runtime? 0 Answers
Load .fbx from remote http server at runtime to use it as animation clip at runtime 0 Answers
animation to animator [mecanim] 1 Answer