[SOLVED]Alternative camera

What I wanted to do is: in a corner of the game window, show a texture or subwindow within the main window, that shows the same scene but from a different point of view.

The teapot on tv sample is not exactly what I need, and when I try to modify things to suit my needs I get errors I don’t know how to fix.

I tried to start it from scratch but despite I followed from the numbers, somehow the functions seem to have changed in the panda version I’m using (1.5.2)

How you would do something like what I want in a simple way?

sounds like you look for something called “display region”
try searching the forum. there should be several threads about it.
if you run into a particular problem with some code just post the code and the error :slight_smile:

Take a look at this:
discourse.panda3d.org/viewtopic.php … playRegion

Nice, that did work and I got my small window. I have just one last question though, here is my code:

        base.makeCamera(base.win, displayRegion = (0, 1, 0, 1)) 
        base.makeCamera(base.win, displayRegion = (0.03, 0.18, .84,.99 )) 

We have two cams, the regular and the ‘detail’ camera at the up left corner.
How can I go back to normal when I’m done with the action I wanted to show in detail?

base.camList[2].setActive(False) is not correct and I haven’t found the right method to disable to camera until I need it again.

You need to get a pointer to the DisplayRegion.

dr = base.camList[2].node().getDisplayRegion(0)

Or you can go to the camera (note this is not the camera NodePath, but the camera node itself):


Not sure if this second approach will disable the DisplayRegion clear or not, though.


David, you made it again, the first piece of code was enough for me, so I can show/hide the second camera view. Thanks to all!