Hey there!
I've been doing a bit of experimentation and have found that the CrossFadeQueued method doesnt take the animationstate speed into account, however the Play command does.
To replicate this do the following;
void Awake()
{
objanimation["walk"].speed = 2f
/*.. removed from awake */
}
public void Update()
{
if(!objanimation.isPlaying("walk"))
{
objanimation.Play("walk");
}
}
The above will work fine and play the animation back at twice speed, however replace this with the following
void Awake()
{
objanimation["walk"].speed = 2f
/*.. removed from awake */
}
public void Update()
{
if(!objanimation.isPlaying("walk"))
{
objanimation.CrossFadeQueued("walk",0.2f,QueueMode.PlayNow);
}
}
And it won't work at all, it will just play back at the normal speed?
Any ideas?
You misinterpret things. CrossFadeQueued is not supposed to clone properties from "original" state, it only finds clip with same name (at least as far as I remember). You can always do this:
AnimationState newWalk = objanimation.CrossFadeQueued("walk",0.2f,QueueMode.PlayNow);
newWalk.speed = 2;