Camera...

On my system chicken don’t run,there is a problem with the python version so I use the .x format and converting it to egg (without conversion it not works) but i can’t import the camera.
I tried to use an empty and ,after i load the file,i copy the
position and rotation of the empty to camera.
But it don’t works and i don’t understand why.

        # carica il file
        self.orol = self.loader.loadModel("completa.egg")
        self.orol.reparentTo(render)
        self.orol.setPos(0,37,0)
                
        self.miacam = self.orol.find("**/camera_empty")
            
        position = self.miacam.getPos(render)
        camera.setPos(position)
        

Did you call base.disableMouse() first? You need to do that or camera.setPos() doesn’t work as expected.

NO i didn’t :blush: ,now it works.

I’m exporting with .x blender file but the information
about the Hpr of the empty is not correct.
I copied the Hpr information from empty to camera and
the camera is not oriented as it should.
There is a reason for that?

Make sure the egg file has a entry for the empty node. If it doesn’t, then it got lost in the conversion, and you’ll need to figure out why or this will never work.

If it does have a entry, then you should also add a { 1 } entry next to it. This tells the egg loader that this transform is important and should be preserved in the loaded model.

David