[Solved]Simple camera movement


After just playing around, testing, and choosing Panda3D, I want to start some learning.

So, I loaded the panda-walk model that comes with Panda3D, and I wanted to camera to ‘look down’ on the panda, just like an RTS for example.

Now, I have this:

from direct.showbase.ShowBase import ShowBase
from direct.actor.Actor import Actor
class MyApp(ShowBase):
    def __init__(self):

        self.pandaActor = Actor("models/panda-model", {"walk": "models/panda-walk4"})


app = MyApp()

Now, I guess the self.camera.setPos(0,0,10) should put the camera on a 10 units height? But nothing happens, it is just on the same height as the pandaActor. (the pandaActor is indeed 50 units away on the y-axis.)

Thank you in advance.

Before you can move the camera manually, you need to call


to disable the default mouse controls for the camera.

You can move the camera (base.cam) not the camera node (base.camera) with the default mouse control still on.

The manual says to use base.camera, but I never bumped into problems using base.cam.

We don’t endorse using base.cam for camera positioning unless you understand the implications it brings. Even so, you don’t want your camera transformation to be distorted by the default trackball system. Just call disableMouse and use self.camera.

Ok, thank you guys for the explanation.

I don’t know what implications base.cam should or could have, so I won’t use it. But still thanks for the hint, maybe I can look into it if i’m somewhat more expirienced :slight_smile:

Thanks, this is solved.