Where Can I Find The Default Camera Codes?


I’m trying to learn how to program the camera, and sadly, the manual doesn’t really go far enough, so what I’d really like to do, is study and play around with Panda’s default camera codes. In the manual it says:

The trouble is, I can’t find any of these codes. I looked in the ShowBase directory but no luck. Does anybody know where I can find the codes for the default camera ‘tasks’ and ‘methods’ such as useDrive() that are mentioned above.

Thanks a lot.

Why do you need the camera control code?

Maybe you can find what you need here

I just want to study them to see how they work. You see, I’m really trying hard to learn Panda3D and I’ve found that studying actual code is an enormous help to my learning process.

I was hoping that the actual camera code was somewhere in one of the Panda directories (like GravityWalker.py, DirectButton.py… and so on).

I guess that what I’m looking for is some pre-defined code that I can learn from and tweak to make my own camera controls, without having to write it all from scratch (which is very hard for a newbie :unamused:).

Thanks for your response.

It’s ok, I found them. Geez, I knew they had to be there somewhere (I’ve just searched through every directory :open_mouth:).

For anybody who’s interested, you can find them in this directory:

direct > src > directtools > DirectCameraControl.py

Hehehe now I’ve got something to work with :smiley: (fear not, I won’t alter the original code, I’ll make a copy of it to play with).