Point & Click Turning Bug!

Given how many other things Python and Panda3d handle automatically, I almost wouldn’t be surprised if there were a “swearing and threatening dire consequences” detector. Obviously, someone will have to build one in :wink:

try:
  myFunction(defaultOptions)
except SwearingAndThreateningDireConsequences:
  myFunction(-defaultOptions)

If you find that it’s spinning the wrong direction in all cases now, that’s good news: it probably means something in the equation is negative that should be positive. Maybe change an addition to a subtraction and try again?

It might also be helpful to walk through the calculation on paper. Write down the starting heading and your desired heading, then see if you can guess how the lerp function will go from one to the other. Doing this can help you isolate what about the lerp’s behavior isn’t matching up with your expectations. Even if it doesn’t solve the problem directly, you may gain a deeper insight to how the lerps work; that will almost always be helpful down the road.

Best of luck!
-Mark

[/code]