- Home /
Does anyone know that rotation animation using AnimationCurve?
I have following code:
public class AnimationTest : MonoBehaviour {
public float time=5.0f;
// Use this for initialization
void Start () {
AnimationCurve curve = AnimationCurve.Linear(0.0f, 10.0f, time, 120.0f);
AnimationClip clip = new AnimationClip();
clip.SetCurve("", typeof(Transform), "localRotatition.y", curve);
animation.AddClip(clip , "test");
animation.Play("test");
}
}
But It is not woking for roration animation. Could you tell my why? How to do a rotation animation using AnimationCurve.
Thanks.
Comment
Your answer
Follow this Question
Related Questions
Why one of object's animation has global rotation data, and another has local rotation data? 0 Answers
How do I rotate my parent object without rotating the child object? 0 Answers
Animation switching but rotation isn't proper! 0 Answers
How do I stop my enemy character from spinning around in circles when I run past him? 0 Answers
Unable to override animation by rotating in-game using slider 0 Answers