Browse Source

ragdoll cleaning

shuvit 4 years ago
parent
commit
62353c5381
1 changed files with 0 additions and 6 deletions
  1. 0
    6
      scripts/ragdoll.py

+ 0
- 6
scripts/ragdoll.py View File

1
 import bge
1
 import bge
2
-#from mathutils import Vector
3
 from math import radians
2
 from math import radians
4
 from mathutils import Quaternion, Vector, Matrix
3
 from mathutils import Quaternion, Vector, Matrix
5
 
4
 
23
 
22
 
24
     
23
     
25
 def update_rb(physBody, scene):
24
 def update_rb(physBody, scene):
26
-    #print('updating rigid body positions')
27
     armature = scene.objects['Char4']
25
     armature = scene.objects['Char4']
28
     master = armature.parent
26
     master = armature.parent
29
     master = scene.objects['control_cube.002']
27
     master = scene.objects['control_cube.002']
44
     if armature.parent != None:
42
     if armature.parent != None:
45
         master = armature.parent
43
         master = armature.parent
46
         if not armature.parent.isSuspendDynamics:
44
         if not armature.parent.isSuspendDynamics:
47
-            #armature.parent.suspendDynamics(True)        
48
             pass
45
             pass
49
     armature.removeParent()
46
     armature.removeParent()
50
-    #print(armature.parent)
51
-    #print(physBody.groupMembers)
52
     physBody.restoreDynamics()
47
     physBody.restoreDynamics()
53
     for pB in physBody.groupMembers:
48
     for pB in physBody.groupMembers:
54
         pB.restoreDynamics()
49
         pB.restoreDynamics()
74
     
69
     
75
     
70
     
76
 def main():
71
 def main():
77
-    #print('doing main')
78
     cont = bge.logic.getCurrentController()
72
     cont = bge.logic.getCurrentController()
79
     own = cont.owner
73
     own = cont.owner
80
     scene = bge.logic.getCurrentScene()
74
     scene = bge.logic.getCurrentScene()

Loading…
Cancel
Save