Guest User

Untitled

a guest
Oct 20th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. import bge
  2. import math
  3. from math import *
  4. import mathutils
  5. import time
  6.  
  7. import sys
  8. import glob
  9.  
  10. # Get the whole bge scene
  11. scene = bge.logic.getCurrentScene()
  12. # Helper vars for convenience
  13. source = scene.objects
  14. # Get the whole Armature
  15. main_arm = source.get('Armature')
  16. ob = bge.logic.getCurrentController().owner
  17.  
  18. print(ob)
  19.  
  20.  
  21. def main():
  22. print("Init main")
  23. 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]]
  24. for i in range(len(angles)):
  25. angles[i] = [float(x) for x in angles[i]]
  26. print(angles[i])
  27. ob.channels['Bone'].rotation_quaternion = mathutils.Vector([angles[2][1],angles[1][0],angles[3][2],angles[1][3]])
  28. ob.update()
  29. time.sleep(0.001)
Add Comment
Please, Sign In to add comment