List of Issues & Solution in Panda 1.1 migration

Since i meet a lot of issue migrating my code base from previous Panda version (mainly due to migration to latest python version), i post there the issue i met and how i solved it. I’m really not sure if it’s real issue or poor coding from me but,just in case someone meet the same…
Also don’t hesitate to add yours if any.

 import Error, cannot find module xxx

Solution: casse in import statement must match the casse in file system even on windows (



TypeError: Error when calling the metaclass bases
    module.__init__() takes at most 2 arguments (3 given)

from direct.showbase import DirectObject
then defining classXX(DirectObject) is no more valid.
Right syntax is : classXX(DirectObject.DirectObject).

now add_collider must receive only a NodePath as first argument…

How to get a NodePath and not a CollisionNode

I think its not good if we have to change source code because of an new engine

Yeah, that change is driving people nuts. But the old API really was illogical. If I insert a node into the collision system, how can it tell which instance of the node I want to collide with? (See the chapter on instancing in the manual if you don’t know what that means). The solution is that you have to insert a nodepath into the collision system. So let’s say you want a spaceship with a spherical collision solid around it:

collisionNode = CollisionNode(…)
collisionNodePath = spaceship.attachNewNode(collisionNode)
traverser.addCollider(collisionNodePath, …)

Ok thats an good argument. Is there anybody having the time to write a short tool to change old panda code to panda 1.1 code