Writing my own C++ in the engine

I am trying to implement some things within the Panda3D engine such as path finding. I am not exactly sure how to do this though. I don’t know if I should edit existing files or just write my own C++ files that do what I want them to do. If anyone knows which of the two methods mentioned would work best, please give me some insight.

Also, whichever method seems best or whichever method you can think of, How would I actually go about compiling that into the existing Panda3D Engine code?

Thanks.

Please try to resist the temptation to cross-post. All of us generally read all the forums here, so there’s not a lot of advantage to posting your request multiple times in different forums.

If you really and truly want to add your code into the existing Panda C++ codebase, examine the “skel” directory in panda/src. But if you only want to write your own C++ code and call it from Python, you don’t need to do it this way. There are lots and lots of options, and any of them is as good as any other–choose the one that you like the best.

David

Thank you for your response. I did not mean to repost. I meant this post as a different question than my previous one and I thought it belonged in this forum better. I see now that I could just edit the BasicSkel or TypedSkel classes to do what I want them to do but I would rather make my own classes and use them. I would have to add this to the build process somehwere I am guessing such as in the makepanda.py file but I do not know exactly what to edit.

I have tried looking for this information but the link from this site that is supposed to show how to compile C++ files for Panda3D has not been working because it cannot be found or something similar to that.

Thanks.

Any class you add in most panda source directories, will automatically be found by makepanda, wrappers will be generated and compiled.
Just make sure you include your cxx file from within the _composite file.