I’m encountering a bit of strangeness with controlling Panda3d’s camera using setHpr. Using the method:
camera.setHpr(h, 0, 0)
where h varies, the heading the camera is set to look at works as expected. With the code
camera.setHpr(h, 90, 0)
however, the heading converts into rotation, and any attempt to change h only rolls the camera around the global Z axis.
I know that I am almost certainly missing something very obvious here. Could someone point this n00b in the right direction?
EDIT: To use a better example of the behavior, imagine the camera as looking out the forward window of a space ship. When your pitch is zero degrees, when you change heading, you pan around the global Z axis. When you are at pitch up 90 degrees, and then attempt to change the heading, the ship (and camera view) should now change heading around the global X axis. Instead, it continues to pan along the global Z axis.