hprInterval rotates 270 degrees instead of 90...


I’m having a bit of a problem with hprInterval.
Here is what I do in the code:

self.camPivot.hprInterval(0.5, self.playernode.getHpr()).start()

It works nice, and positions the camera behind the player. But if I rotate too much it will sometimes do a 270 degree turn, or something, to face the new direction. That isn’t quite what I want it to do.

I remember seeing an old thread about this during one of my forum searches, but sadly I was looking for something else at that time and now I can’t find the thread again.
It is also possible that I remember wrong and that the thread was really about something else.

So, does anyone know of a nice way to make hprInterval rotate only in 90 degrees turns (playernode only rotates in 90 degrees at a time), or can find an older thread that deals with this? My search-fu is weak, and the forum search spams the result with multiple topic that is completely unrelated to my problem. :confused:

Thankfull for any help.

Try using quatInterval instead.