New version of Panda Tools?

Each time you call base.makeCamera(win), it creates a new camera to render into that window; all the cameras are stacked up in the order you create them. You can change the order later by using the setSort() method on GraphicsLayer.

Note that you may need to play with the depth test via nodePath.setDepthTest() and/or nodePath.setDepthWrite() to avoid the cameras competing with each other, when you have multiple cameras rendering into the same region.

To really understand what’s going on and to get more control over multiple cameras within one window, you should learn more about DisplayRegions and GraphicsLayers. See the API documentation for more information about these objects. Cameras don’t actually render to the window; each camera renders to a DisplayRegion. base.makeCamera() creates a DisplayRegion that fills the whole window, but you can make smaller DisplayRegions if you want. Also, each DisplayRegion is part of a GraphicsLayer, and all the GraphicsLayers are stacked up in a window like pancakes.

David

Just tried that GravityWalker.py thing, no idea how to get it to work. So, could I have another example? :blush:

1 Like

I don’t think the GravityWalker, or the family of *Walker.py files, are useful without some of the Toontown code that they depend on. They aren’t really meant to be used directly, but they can serve as a kind of example to provide ideas to use to write your own kind of Python class to move the player’s avatar around.

Or you can call base.useDrive() to get a primitive drive-mode interface that’s built into the C++ layer. You can integrate the DriveInterface with simple collisions to keep your avatar out of walls and moving up and down ramps, but not a whole lot more.

David

Does that also work for keeping the camera out of walls? If I had a room, could I have the character running around without bumping into something and jump and actually land on the floor? I just want a little example without the fancy things like bouncing back if you walk through the wall. Thanks :wink:

Look to the sample applications on the CMU website for examples of using this kind of collisions. You will use a CollisionHandlerPusher to keep the camera out of walls. It sounds like it “bounces back”, but really “pushing” you out of walls just means that the wall appears solid–you appear to stop when you hit it, not actively bounce back.

David

Hmm… I just tried out the GravityWalker, seemed to work fine.
You just need to add 4 lines to fix a bug in it:

if rotationSpeed == None:
  rotationSpeed = 0
if speed == None:
  speed = 0

Look at what my little post over a year ago has turned into? :slight_smile:

Anyways, glad to see the forums back up, I enjoy reading the discussions on here. And I think you are awesome David for the amount of feedback/help/technical information you provide here, on top of what I am sure must be a pretty busy work schedule.

And panda.egg, Toontown ripper? That sounds so bad and mean, I prefer the term Toontown Enthusiast. I am one of the ones that has also used Panda to ‘view the Toontown assets’ like you said David, but at the same time I am very interested in 3-D graphics engines as well, ever since id Sofware released Wolfenstein 3D. So I applaud the Disney VR Studio for making Panda 3D open source, and appreciate all the hard work that has been and is still being done by the ETC and Disney. ‘You guys are great!’

As for BAM files, I finally got around to adding to my little PMF Viewer the ability to dump some information about the BAM file, namely the textures that are used in the model(s). And the latest addition is the ability to parse the DNA files into a tree structure to make them easier to view. :slight_smile:

Well, sorry to carry on for so long.

Yeah, those DNA files are hard to actually see, but someone might make a program to parse & view them.

That is what I was saying, I did add the ability to view DNA files in a tree structure to my PMF Viewer program. I was tired of looking at them as a flat file. :slight_smile:

Cool! Can you give me instructions on how to do that?

:wink: