Hi all,
Several people requested or suggested me that a Roaming Ralph (or one alike) sample would be helpful. So, I started doing it, and I succeeded making a duplicate of Roaming Ralph, but now in C++.
Goal
Making C++ users of Panda3D familiar with basic things like animation and collision.
Screenshot
Something like this:
Notes
For sorting the CollisionEntries, I’ve just grabbed some sorting function from the internet, and after some vector and pointer hell, I got it to work. You could perhaps to this much easier with std::sort. After all, I’m not a C++ professional.
Download
You can download it here:
Roaming-Ralph-CXX.tar.gz
Build instrustions
Pretty basic. Same as you would do with any other Panda3D C++ program.
Oh, by the way, when linking, I just needed to link to p3framework and p3pystub.
And I have a few questions/remarks to the Panda3D developers/maintainers:
*Any chance if this would be included in Panda3D distro?
*Do you think we need more samples like this?
*Roaming Ralph defines a SPEED variable, and never uses it afterwards. Could be removed, huh?
*Roaming Ralph defines a MYDIR variable to detect the application path. Never uses it though when loading models, though. I’d suggest that it should be used, to make ralph roamable from other directories than where it’s in.
*Roaming Ralph uses matrices to detect its forward vectors. This is very confusing to beginners. Couldn’t we let ralph roam with a setY relative to itself?
That would be all for today I hope this helps somebody.
– pro-rsoft