![]() |
#1
|
|||
|
|||
MainView and getEuler
Dear Vizard Staff,
I have a question I'm sure you'll be able to wrap up easily. I have a viewpoint being controlled by an XBox controller: Code:
#Move locally in the Left to Right Direction self.viewport.setEuler([self.gRotation[0], 0.0, 0.0], viz.BODY_ORI, viz.REL_LOCAL) #Move globally in the Up to Down Direction self.viewport.setEuler([0.0, self.gRotation[1], 0.0], viz.HEAD_ORI, viz.REL_LOCAL) #Roll self.viewport.setEuler([0.0, 0.0, self.gRotation[2]], viz.HEAD_ORI, viz.REL_LOCAL) When I try and use getEuler(), the values I get back do not match the actual orientation of the MainView. I've tried using the masks for the body and the head, however I still can not match the original orientation. Is there a method to concatenate the matrix transforms so I can get the final orientation value to save the orientation? |
#2
|
|||
|
|||
It's hard to tell what the problem is without more information or sample code. Either way, I would recommend using quaternions (getQuat/setQuat) to save and restore orientations.
|
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|