Hi there,
It may be because i am still fairly new to Panda3D, or that i am just missing something, but i cant seem to get to grips with positioning the camera. All i am basically trying t do is, when i run the program, i would like the player model to be centered in the camera. But i just cant seem to get it right.
I have,
base.disableMouse()
self.camera = base.camera
self.world.setPos(0, 0 ,0)
self.world.reparentTo(self.render)
self.player.reparentTo(self.world)
self.player.setPos(0, 0, 500)
self.camera.reparentTo(self.player)
self.camera.setPos(0, 0, 0)
According to the book i am reading, Panda 1.6 Game Engine, this should “center” the player model in the camera, but no matter what i try, i just cant seem to get it right. In his book, its seems to work perfectly.
I apologize if this is basic stuff, but i have tried looking for a tutorial on just using the camera, but cant find anything except small snippets of advanced code, which i cant see any relevance to what i am trying to achieve.
If anyone could please help with this i would greatly appreciate it, or provide me with the a link to a camera tutorial so i can see where i am going wrong.
Thank you very much and have a great day.