Search Unity

Resolved How to convert quaternion curves to eulerangles curves

Discussion in 'Timeline' started by sans108, Dec 7, 2021.

?

How to convert quaternion curves to eulerangles curves

  1. f

    1 vote(s)
    100.0%
  2. f2

    0 vote(s)
    0.0%
  1. sans108

    sans108

    Joined:
    Apr 1, 2021
    Posts:
    13
    Hi,

    I create a custom timeline clip with position, rotation. Now I want to import an animationClip into my custom clip.

    But the rotation data in animationClip is m_RotationCurves.

    My custom timeline clip data is m_FloatCurves.

    I know that I can convert the "value" of quaternion to eulerangles, but how to set the "tangents" and "weight".

    Please help me out
     

    Attached Files:

  2. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    You can usually get the Euler curves using AnimationUtility.GetEditorCurve
    The exact name of the curve varies based on what rotation mode you use, but the name is one of the following:
    • localEulerAnglesBaked
    • localEulerAngles
    • localEulerAnglesRaw
     
  3. sans108

    sans108

    Joined:
    Apr 1, 2021
    Posts:
    13
    @DavidGeoffroy It works !!! Thank you so much, Sir. You just save my day! :):)