How to change camera controls for mouse

I want to change the way the mouse controls the camera in a scene and was wondering how and if it is possible to do so easily. I want something like left mouse button to pan, right to rotate , and scroll wheel to zoom in and out. Is this possible, or am I stuck with the default scheme that ships with Panda3D

In short, I would suggest disabling the default camera control and then implementing your own: accept the relevant events for the mouse, connect them to methods of your own making, and update the camera accordingly.

(I don’t know offhand whether it’s possible to change the handling of the default camera-controls; it might be.)

is there like a reference code to how this new implementation will look like.

I think that I may have seen some such on the forum–have you searched? (In particular the “code snippets” sub-forum.)

no, but will do thanks

1 Like

Hey mate, I tried but couldn’t find any code for the following, I was hoping if you knew where to find them u can post the link here. Much appreciated.


The following may or may not be exactly what you’re looking for–naturally I don’t know what precisely you have in mind–and I haven’t tried them myself that I recall and so am not in a position to speak one way or another to their quality. I also recommend reading through the threads to see what others had to say about them.

That said, these may at least provide a good starting-point for you:

thanks a lot, mate, I will look into it, I also had one other question. So, my game is running on the integrated graphic even though I have a discrete card, any idea what might be causing that? And is it possible to open the app in another GUI like Qt or something? Sorry if this isn’t the place to ask it. I have a lot of ideas and want to get a crack on them before I get busy with some other work again.

1 Like

Hmm… That might be a matter of the settings for your graphics card. I know that mine has a control-program that provides options specifying whether and when to use its integrated or dedicated graphics chips.

I believe so, yes.

I’ve not done it myself, I’m afraid, but I think that I’ve seen threads by others discussing so doing. Again, I’d suggest searching the forum for clues!

It might arguably have been worth making separate threads for these questions, simply to aid others who might search for similar answers in the future.