Model flashes by

I am pretty new, but couldn’t find a newbie question room, so I am asking here:

I’ve made a very small Panda3d script, it renders a wireframe spacehip and then repositions the camera horizontally by one every to seconds. Things is, it doesn’t work quite well. I get some text on the lower right, like expected, but the model is only visible for a short flash, I am guessing 1 frame and then disappears again. I am pretty sure I am making a newbie mistake, but can’t find it yet.

This the code;

class MyApp(ShowBase):
 
    def __init__(self):
        ShowBase.__init__(self)
 
        ## Set the backgroud color
        self.setBackgroundColor(0, 0, 0)
        
        # Load and transform a simple model ship
        self.ship = loader.loadModel("./models/ship.egg")
        self.ship.setScale(1.0, 1.0, 1.0)
        self.ship.setPos( 0,0,3)
        self.ship.setRenderModeWireframe()
        self.ship.reparentTo(self.render)
 
        # Move the camera horizontal every 2 seconds      
        self.taskMgr.doMethodLater(2, self.MoveCam, "MoveCam")
        
        self.title = OnscreenText( text="Spacer", style=1, fg=(1,1,1,1), pos=(0.8,-0.95), scale = .07)
        self.counter = 0
 
    ## Procedure to move the camera    
    def MoveCam(self, task):

        self.camera.setPos(0, -20, self.counter)
        self.title.setText(str(self.counter))
        self.counter = self.counter + 1 
        
        if self.counter > 10 :
            self.counter = 0
        
        return Task.again    
    
app = MyApp()
app.run()

I use a wireframe because otherwise my model is just an opaque white blob.
I’ve noticed that if I position the camera outside the task, nothing ever shows.

Did you try calling self.disableMouse() ?

I did not. And now I’ve gotten a bit further in my understanding. Thanks.