SPLINE: interpolate angle

Blitz3D Forums/Blitz3D Programming/SPLINE: interpolate angle

Hi!

I made my own editor for my game, which contain a cinematic editor. All the camera movement are made with spline. It works like 3DSMax, I mean you create your keyframe.

But I've got a problem, with the interpolation of the angle.

An exemple:

The camera angle is beetween 180 and (-180). Or when I create a keyframe 1 with an angle of 170 and a keyframe 2 with an angle of -150. The program will interpolate the angle like that : 170-160-150-140-...-0-(-10)-(-20)-...-(-150).

But in fact I'd like that it interpolates like that 170-180-(-170)-(-160)-(-150)

Do you have a trick to solve my problem?
Quaternion can resolve that?

Thank you