Point & Click Turning Bug!

You can import a function from direct.showbase.PythonUtil called closestDestAngle. It should help.

def closestDestAngle(src, dest):
    # The function above didn't seem to do what I wanted. So I hacked
    # this one together. I can't really say I understand it. It's more
    # from impirical observation... GRW
    diff = src - dest
    if diff > 180:
        # if the difference is greater that 180 it's shorter to go the other way
        return src - (diff - 360)
    elif diff < -180:
        # or perhaps the OTHER other way...
        return src - (360 + diff)
    else:
        # otherwise just go to the original destination
        return dest

Also, creating a temp nodepath every move might cause some extra memory usage. Its possible Panda will keep the nodepath around in the scene graph even though your function has lost its scope. It would be better to create a single nodepath and parent it to your player. Then you can call lookAt() on that single nodepath each move instead of creating a new one each time.