can't set camera position

No matter how I change the coordinate of camera.setPos(x,y,z), my viewpoint seems to be fixed at the origin. I’m really confused… Need help. Thanks!

import direct.directbase.DirectStart

class World:
    def __init__(self):
        #Load the environment model.
        self.ground = loader.loadModel("models/Ground2.egg") = loader.loadModel("models/sky.egg")
        # Reparent the model to render.
        #Apply scale and position transforms on the model.
        self.ground.setScale(5, 5, 5)
        self.ground.setPos(0, 0, -7)
        #Apply scale and position transforms on the model., 1, 1), 0, 0)

        self.building = loader.loadModel("models/building.egg")
        self.building.setScale(0.2, 0.2, 0.2)

        camera.setPos(0, 0, 100)
w = World()

You need to call base.disableMouse() first to turn off the trackball object that will otherwise constantly reset your camera position to the trackball control position.


Yes…I see. Thank you.