shuvit 6 years ago
parent
commit
979e83bd1f
2 changed files with 22 additions and 9 deletions
  1. 18
    8
      controller2.py
  2. 4
    1
      walk.py

+ 18
- 8
controller2.py View File

@@ -2203,14 +2203,17 @@ def main():
2203 2203
                 deck.stopAction(fliplay)
2204 2204
                 trucks.stopAction(fliplay)
2205 2205
                 killall() 
2206
-                if own['dropinTimer'] > 30:
2207
-                    print("dropinanim2")
2206
+                if own['dropinCol'] == True:
2208 2207
                     own['requestAction'] = 'fak_dropin'
2208
+                    own['dropinTimer'] = 60
2209 2209
                 else: 
2210 2210
                     own['requestAction'] = 'fak_onboard'
2211
-                force = (linVelocity.x +1, linVelocity.y, linVelocity.z)
2212
-                own.setLinearVelocity(force, True)
2213
-                own['dropinTimer'] = 60
2211
+                    force = (linVelocity.x +1, linVelocity.y, linVelocity.z)
2212
+                    if own['dropinTimer'] == 0:
2213
+                        own.setLinearVelocity(force, True)                    
2214
+                #force = (linVelocity.x +1, linVelocity.y, linVelocity.z)
2215
+                #own.setLinearVelocity(force, True)
2216
+                #own['dropinTimer'] = 60
2214 2217
         else:
2215 2218
             num = own['dropinTimer']
2216 2219
             if num > 0:
@@ -3992,12 +3995,19 @@ def main():
3992 3995
     def dropinRotate():
3993 3996
         if own['dropinTimer'] > 30 and own['dropinTimer'] < 40:
3994 3997
             rot = [ 0.01, 0.0, 0]
3998
+            vel = [linVelocity.x - .25, linVelocity.y, linVelocity.z - .01]
3999
+            if STANCE == 1:
4000
+                rot = [-0.01, 0.0, 0]
4001
+                vel = [linVelocity.x + .25, linVelocity.y, linVelocity.z - .01]
3995 4002
             local = True
3996 4003
             own.applyRotation(rot,local)
3997
-            force = (linVelocity.x - .25, linVelocity.y, linVelocity.z - .01 )
3998
-            own.setLinearVelocity(force, local)            
4004
+            #force = (linVelocity.x - .25, linVelocity.y, linVelocity.z - .01 )
4005
+            own.setLinearVelocity(vel, local)            
3999 4006
         if own['dropinTimer'] == 50:
4000
-            force = (linVelocity.x -1, linVelocity.y, linVelocity.z )
4007
+            if STANCE == 1:
4008
+                force = (linVelocity.x +1, linVelocity.y, linVelocity.z )
4009
+            else:
4010
+                force = (linVelocity.x -1, linVelocity.y, linVelocity.z )                    
4001 4011
             own.setLinearVelocity(force, True)               
4002 4012
 
4003 4013
     framenum = own['framenum']

+ 4
- 1
walk.py View File

@@ -658,7 +658,10 @@ def getonboard():
658 658
                     else:
659 659
                         grindside = "left"                    
660 660
                     deltamove = delta[2] * .1#.25
661
-                    move = [-deltamove, 0, 0]
661
+                    if STANCE == 0:
662
+                        move = [-deltamove, 0, 0]
663
+                    else:
664
+                        move = [deltamove, 0, 0]                            
662 665
                     #print("1deltamove", deltamove)
663 666
                     own.applyMovement(move, True)                    
664 667
                 except:

Loading…
Cancel
Save