Hello everybody.
First of all, please forgive my future english mistakes, i’m french.
I need to blend between a mecanim animation and a procedural scripted one.
The mecanim part is easy, i just have to lower the layer weight to remove progressively the animation.
The difficulty come from the procedural part.
I know how to weight my procedural animation, but i don’t how to apply it properly over the mecanim result.
So far, i’ve gone this way :
public void LateUpdate()
{
Quaternion incomingRotation = myBone.transform.rotation;
Quaternion additiveRotation = Quaternion.Euler(0.0f, 1.0f, 0.0f); // Lets say it is the weighted procedural animation.
myBone.transform.rotation = additiveRotation * incomingRotation;
}
So, basically, i take the rotation processed before the late update (supposed to be the mecanim one) and try to add my own rotation, expecting to have the resulting rotation.
But the bone keep rotating as if it is cumulating the additiveRotation of each frame.
Is there a way to do what i’m looking for ?
Thanks.