I’ve had a hard time figuring out why I always had to switch roll and pitch rotations (+rotation order) for all of my models. Then I realized that in panda3d the x-axis points right and the y-axis points forward, whereas I need the models to face forward along the x-axis and rotate respectively. So, if I use the setHpr-method, it does not rotate as I wish.
So far, I’ve added some dummy-nodes to my models and manually applied the rotations in the order yaw-roll-pitch.
self.dummy1.setH(yaw) self.dummy2.setR(pitch) self.dummy3.setP(roll) self.model.reparentTo(dummy3)
The models are placed forward-facing in x-direction in blender. So, if I want to rotate my object around the y-axis (e.g. facing front upwards), I would expect to set the variable pitch but I actually have to change the roll-value of the panda3d-node. Same with roll.
What would be the most reasonable approach if I neither want to change all models nor always switch out roll and pitch and apply a manual rotation order? Even if I rotated all models by 90° in blender to face forward in y-direction, I would still have to rotate them back again in panda3d. Is there a way to change the configuration of pandas coordinate system or any other non-confusing solution?
Best regards and thanks in advance for any help,