worldOrientation
worldOrientation
gets/sets the object's world orientation.
Type: 3x3 matrix.
Sample Code
################# Get world orientation
# get the controller
controller = GameLogic.getCurrentController()
# get the game object that the controller is attached
to.
obj = controller.owner
# get owner's world orientation
orientation = obj.worldOrientation
################# set world orientation
# get the controller
controller = GameLogic.getCurrentController()
# get the game object that the controller is attached
to.
obj = controller.owner
# set owner's world orientation
obj.worldOrientation = [[1.0, 0.0, 0.0], [ 0.0, 1.0, 0.0], [0.0, 0.0,
1.0]]
|