Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bge
- import math
- from math import *
- import mathutils
- import time
- import sys
- import glob
- # Get the whole bge scene
- scene = bge.logic.getCurrentScene()
- # Helper vars for convenience
- source = scene.objects
- # Get the whole Armature
- main_arm = source.get('Armature')
- ob = bge.logic.getCurrentController().owner
- print(ob)
- def main():
- print("Init main")
- angles=[[0.8,0.5,0.8,1,5],[0.7,0.6,0,5,0.7],[0.5,0.6,5,0.4,2],[0.7,0.5,0.3,0.4,0.4],[0.1,0.7,0.6,0.4,2]]
- for i in range(len(angles)):
- angles[i] = [float(x) for x in angles[i]]
- print(angles[i])
- ob.channels['Bone'].rotation_quaternion = mathutils.Vector([angles[2][1],angles[1][0],angles[3][2],angles[1][3]])
- ob.update()
- time.sleep(0.001)
Add Comment
Please, Sign In to add comment