Very commonly, games developers will want to be able to get a reference to the objects that have collided so they can modify some attribute of one or the other, such as a character taking damage when they are hit by an attack. In Panda3D, we can easily get the From and Into
CollisionNodes from the collision entry with
But, that doesn't give us the class instance that actually owns the
CollisionNode. For that, we need to attach a reference to the class instance to the
PythonTag is a way to attach a reference of one thing to another. We use
setPythonTag to create ...