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