Physics simulation for character hair

The easiest would probably to check for one of the existing extension modules for Panda3D, like “rocket”, and search makepanda.py for the string “rocket”, and copy the relevant instructions. If you want to try your own hand at playing with interrogate, looking at how makepanda invokes interrogate would be a good statr.

There’s also a page on Interrogate at the manual, though it’s a bit limited.

You can’t pass Python objects to a C++ extension. Actor inherits from NodePath, so if you pass an Actor to C++, the C++ code will only see NodePath. As for strings, interrogate automatically writes code to map those to C++ strings.

The task manager is C++, so that’s possible, but you might also consider subclassing PandaNode and overriding something like cull_callback (called when the node is being considered for rendering), or transform_changed, or something of the sort. Or, even directly with Panda’s joint animation system. You can just add a task but working in C++ gives you opportunities to work much closer to the metal.

Panda doesn’t really store this information, but it does store the last frame’s transform for fluid collision checking (but it would also require you to use nodePath.setFluidPos instead of nodePath.setPos). You could possibly make use of that. Otherwise, you’re on your own, and you’ll have to use a traversal that runs each frame, or transform_changed hook, or something like that (though keep in mind transform_changed only gets called when a node position changes, not that of its parents).