|
getAxisVectgetAxisVect(worldVec)Returns the alignment of the Game Object's x-axis and y-axis and z-axis to a World vector.Return type: List [ cosine of the angle of object x-axis to a world vector, cosine of the angle
of object y-axis to a world vector,
cosine of the angle of object z-axis to a world vector ] worldVec: Type: List
[ worldX, worldY, worldZ]
Examples:
A world vector
pointing in the direction of the World X axis: [1.0, 0.0, 0.0]
A world vector pointing in the direction of the World Y axis: [0.0, 1.0, 0.0] A world vector pointing in the direction of the World Z axis: [0.0, 0.0, 1.0] Sample Code# get the controllercontroller = GameLogic.getCurrentController()# get the game object controller attached toobj = controller.owner# get game object alignment to the World x-axisvect = obj.getAxisVect( [1.0, 0.0, 0.0]) |