Hi,
I’m reading Panda3D “Hello World Tutorial”, and I have several questions:
1.
My mouse has only left and right button, but has no middle button. How can I simulate these two middle button operations?
2. What is the coordinate that Panda3D uses? Do I draw right (figure 1)?
3.
def spinCameraTask(self, task):
angleDegrees = task.time * 6.0
angleRadians = angleDegrees * (pi / 180.0)
self.camera.setPos(20 * sin(angleRadians), -20.0 * cos(angleRadians), 3)
self.camera.setHpr(angleDegrees, 0, 0)
return Task.cont
What is the type of variable “task”, and what is the meaning of the “task.time”?
4.
self.camera.setPos(20 * sin(angleRadians), -20.0 * cos(angleRadians), 3)
Why we need to compute the camera’s x and y coordinates as this? I understand that z = 3 as to move the camera up a bit along the vertical axis.
5. What the default position of the camera, like this (figure 2)?
6.
self.camera.setPos(20 * sin(angleRadians), -20.0 * cos(angleRadians), 3)
self.camera.setHpr(angleDegrees, 0, 0)
Does the order of “setPos” and “setHpr” matter? For example, first translation, second rotation is different as first rotation, second translation in OpenGL.
7. I don’t understand this tutorial well, and I want to know where is the camera’s position in every frame, and the direction it look at (figure 3). May someone explain it in more detail?
Thanks!