问题
I add a rotation animation to a wheel but the wheel does not rotate smoothly. I find the reason is because the curve of the rotation animation is not linear. However after trying out almost all the buttons and options in the editor, I can not find a way to make the curve of the animation to be linear. Does anyone know how to get animations with linear curve in unity editor.
回答1:
I found the solution by myself and it is very simple. You just open up the animation in the animation window and choose the "curves" tab and then right click in one of the end point of the curve, then choose "auto" and you will see the curve becomes a strait line.
回答2:
In Unity 2020, you can set the interpolation of the curves by
1- Selecting the "Curves" tab, which is at the bottom of the "Animation" window, You should see the red/green blue lines (for transform), and then
2- Right click on the keyframe of the dimension, (x, y or z), you want to set.
3- Then, you should get the options listed in the screen shot below. Left and Right tangents, refers to the anchor "wings" sticking out from the key frame. When set to "Linear", they shouldn't curve any more.
Unity doco gives their (very dry) definitions of the options (Editing Tangents), here
来源:https://stackoverflow.com/questions/49757541/how-to-change-animation-curves-to-be-linear-in-editor