From: Peter D. <pet...@ho...> - 2005-06-22 19:23:25
|
Hello - I've been trying to use PyOde and the Xode parser. Without much success. I've followed the PyOde tutorials, and I can get a simple simulation running fairly well. Well, pygame crashes when I close the window, but the sim works just fine. I've written some XODE files and the parser reads them. I followed the parser example and dumped the object data and everything looks great. The problem is that I don't know how to actually get the simulation to use the objects that the parser has read. I tried creating a list of the objects using namedChild() and then creating and attaching them. However, I get the suspicion from looking at the parser code that it has already done that. I am also have trouble figuring out what to do with hinges. I have not been able to figure out how to differentiate between a body and a hinge. I've been trying to use isinstance() and hasattr() to test for various things but it seems really, well, non-optimal. Has anyone else run into these issues? Apologies if these are dumb questions, I do not have much experience in Python and I think that it might be showing a bit. If someone has a code snippet that shows how to move an object/joint from the parser to ODE I would love to see it. Regards, Peter Doege |