I use the sample code from the document from:
The quad is static, if I bind the animation to child object “Lower”, it is animated.
I spent several days for it, hope someone can help me.
I use the sample code from the document from:
The quad is static, if I bind the animation to child object “Lower”, it is animated.
I spent several days for it, hope someone can help me.
What is the problem, does the Sample code not work ?
Yes, the sample code doesn’t work.
The code:
// Create the clip with the curve
AnimationClip clip = new AnimationClip();
clip.SetCurve(“Lower”, typeof(Transform), “m_LocalPosition.z”, curve);
clip.legacy = true;
And clip SetCurve didn’t set the animation to “Lower”.
If I bind the animation directly to “Lower” object, it is ok.