shivanangel
01-12-2012, 04:05 PM
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:
#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)
The problem comes up when I am attempting to save the orientation of the MainView for another program using this script.
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?
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:
#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)
The problem comes up when I am attempting to save the orientation of the MainView for another program using this script.
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?