360 rotation timeline has strange behaviour

I’ve just started to play with timeline and i have a collectable in my game that i would simply like to spin on the Y axis. I setup my timeline using keyframes while rotating the collectable but when playing the timeline back it has problems past 180 degrees.

Basically, the item rotates around to 180 degrees fine then it spins all the way backwards to -180 before spinning back as expected again. Anyone got any ideas why this might be?

I’ve not used timeline at all - yet, but I have experienced this in 3D before. I believe it has something to do with the animation controller and curves on the object being rotated. Basically the controller gets confused.

I can’t remember exactly the type of controller (possibly euler) which caused this type of behavior, but the solution in 3D was to change the animation controller. If euler I changed it to quaternion and that fixed the problem.

Another less elegant solution is to create a keyframe at 180 degrees and another one at 360 degrees. Set the curve at 180 to constant/smooth and the speed of the rotation will not hitch, slow down or speed up when moving through the middle keyframe.

I know this is not timeline/Unity related but might help point towards a solution.

@kev_pearman
Timeline isn’t for that. That would be very easily done in code. Here is another forum with the same question. Rotate a Vector3 direction - Questions & Answers - Unity Discussions

Timeline is made for objects that move once in one particular way (or animations/audio).