default mouse

import sys
for ip in sys.path:
print ip

import direct.directbase.DirectStart
from panda3d.core import NodePath
from import Actor
from direct.task.Task import Task
from direct.showbase.DirectObject import DirectObject

class World(DirectObject):
def init(self):

base.disableMouse()        ##------1--Disable mouse-based camera-control
camera.setPos(0,-35, 2)       ##------2---Position the camera

self.eve = Actor("eve", {'walk' : "eve_walk"})
self.eve.actorInterval("walk", playRate = 2).loop()

w = World()

Everything is normal, but cannot do anything with the camera when the “default-mouse” is not disabled. Camera hangs at 0 (line 2 is not working), even if it attached to another node, ie already in the local coordinate system. In the manual in the example “A Panda3D Hello World Tutorial” camera moves without turning off the “default-mouse”, what trick ?

Although I recommend against it, you can control the camera object directly (rather than controlling the camera group) by operating on instead of

i might want to throw in that disabling the camera-mouse control does not disable the entire mouse. (the function’s name is really confusing). so unless you want to do both, manipulating the camera by code AND by mouse there is no reason to avoid the base.disableMouse() call.

btw. next time feel free to use the [ code] tags.they preserve indentation which is really important in python

I understand that base.disableMouse() disables not a mouse, and a default browse mode. The problem arises when you need to make an initial placement of the camera, and I wonder why there are no problems in the example, when the camera is set in task-function. … _the_Panda works as expected … welll…why ? :exclamation:

If all you want is to set the initial position of the trackball, you can get a pointer to the Trackball object (I think it’s base.trackball) and call setPos on that: … .Trackball

base.trackball.node().setPos(0, 20, 0)