default mouse

import sys
for ip in sys.path:
print ip

import direct.directbase.DirectStart
from panda3d.core import NodePath
from direct.actor.Actor 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.reparentTo(render)          
self.eve.actorInterval("walk", playRate = 2).loop()

w = World()
run()

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 base.cam instead of base.camera.

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.
panda3d.org/manual/index.php … _the_Panda

base.cam 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:
panda3d.org/reference/python … .Trackball

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