Browse Source

cam height

shuvit 5 years ago
parent
commit
30e304a202
6 changed files with 55 additions and 9 deletions
  1. 8
    2
      Settings.py
  2. 2
    0
      Startup.py
  3. 1
    1
      co_ActionState.py
  4. 27
    3
      controller2.py
  5. 15
    2
      menuV3.py
  6. 2
    1
      walk.py

+ 8
- 2
Settings.py View File

90
     dict['cam_max'] = float(data[58])
90
     dict['cam_max'] = float(data[58])
91
     dict['music_player'] = int(data[60]) 
91
     dict['music_player'] = int(data[60]) 
92
     dict['fxaa'] = int(data[62]) 
92
     dict['fxaa'] = int(data[62]) 
93
-    dict['FXAA_SPAN_MAX'] = float(data[63])         
93
+    dict['FXAA_SPAN_MAX'] = float(data[63])   
94
+    dict['cch_targetHeight'] = float(data[65])         
94
     
95
     
95
     
96
     
96
     #print('bc = ', dict['bc'])        
97
     #print('bc = ', dict['bc'])        
169
         writing.write(str(dict["music_player"])+"\n")
170
         writing.write(str(dict["music_player"])+"\n")
170
         writing.write(str("//fxaa")+"\n")
171
         writing.write(str("//fxaa")+"\n")
171
         writing.write(str(dict["fxaa"])+"\n") 
172
         writing.write(str(dict["fxaa"])+"\n") 
172
-        writing.write(str(dict["FXAA_SPAN_MAX"])+"\n")         
173
+        writing.write(str(dict["FXAA_SPAN_MAX"])+"\n")    
174
+        writing.write(str("//camera target height")+"\n")
175
+        writing.write(str(dict["cch_targetHeight"] )+"\n")    
176
+        
177
+        
178
+        #dict['ccH_targetHeight']     
173
         
179
         
174
         #writing.write(str(own["framerate"])+"\n")
180
         #writing.write(str(own["framerate"])+"\n")
175
         print("writing settings")
181
         print("writing settings")

+ 2
- 0
Startup.py View File

144
     dict['char_loaded'] = 0
144
     dict['char_loaded'] = 0
145
     dict['man_sens_l'] = .03
145
     dict['man_sens_l'] = .03
146
     dict['man_sens_r'] = .08
146
     dict['man_sens_r'] = .08
147
+    dict['walk'] = 1
148
+    dict['cur_ccH_targetHeight'] = .3
147
 
149
 
148
 main()
150
 main()

+ 1
- 1
co_ActionState.py View File

4812
         cur_frame = skater.getActionFrame(trans_layer)  
4812
         cur_frame = skater.getActionFrame(trans_layer)  
4813
         cur_frame = round(cur_frame, 2)     
4813
         cur_frame = round(cur_frame, 2)     
4814
     #print('oG: ', og_request, 'rA:', requestAction, '|aS:', own['actionState'], 'q', queueAction, own['actionTimer'], 'cf', cur_frame)
4814
     #print('oG: ', og_request, 'rA:', requestAction, '|aS:', own['actionState'], 'q', queueAction, own['actionTimer'], 'cf', cur_frame)
4815
-    print('rA:', requestAction, '|aS:', own['actionState'], own['actionTimer'], 'cf', cur_frame)
4815
+    #print('rA:', requestAction, '|aS:', own['actionState'], own['actionTimer'], 'cf', cur_frame)
4816
     cur_frame = skater.getActionFrame(trans_layer)
4816
     cur_frame = skater.getActionFrame(trans_layer)
4817
     #print(cur_frame)
4817
     #print(cur_frame)
4818
     def printplaying():
4818
     def printplaying():

+ 27
- 3
controller2.py View File

330
         STANCE = own["stance"]
330
         STANCE = own["stance"]
331
         playing_action_frame = skater.getActionFrame(LAND_LAYER)
331
         playing_action_frame = skater.getActionFrame(LAND_LAYER)
332
         if lf_ground == False and r_ground.triggered == True:
332
         if lf_ground == False and r_ground.triggered == True:
333
+            own['no_grind'] = False
333
             own['jump_from_trans'] = 0
334
             own['jump_from_trans'] = 0
334
             nearestObject = None
335
             nearestObject = None
335
             minDist = None
336
             minDist = None
798
             except:
799
             except:
799
                 #print('trans jump broke')
800
                 #print('trans jump broke')
800
                 pass
801
                 pass
801
-            if grindHit == False:
802
+            if grindHit == False:    
803
+                if rot.z < .7:
804
+                    rotamt = rot.z * .5
805
+                    own.applyRotation([0, rotamt,0], True)
806
+                    own['no_grind'] = True
807
+                    own['no_grind_pull'] = 1
808
+                 
802
                 own.applyForce(force, local)
809
                 own.applyForce(force, local)
803
                 force2 = [0.0, 0, 150]
810
                 force2 = [0.0, 0, 150]
804
                 own.applyForce(force2, True)
811
                 own.applyForce(force2, True)
3681
         frames_since_grinding = frame - lgf
3688
         frames_since_grinding = frame - lgf
3682
         ylimit = .84
3689
         ylimit = .84
3683
         #print(ground_since, 'ground_since')
3690
         #print(ground_since, 'ground_since')
3684
-        if ground_since < 20 and ground_since > 1 and grindHit == 0:
3691
+        if ground_since < 20 and ground_since > 1 and grindHit == 0 and own['jump_timer'] < 40:
3685
             ylimit = ylimit + ((ground_since - 15) * -.005)
3692
             ylimit = ylimit + ((ground_since - 15) * -.005)
3686
             
3693
             
3687
             yvel = own.linearVelocity.y
3694
             yvel = own.linearVelocity.y
4313
 
4320
 
4314
     def air_mover():
4321
     def air_mover():
4315
         if r_ground.triggered == False and jump_timer > 53 and frames_since_grinding > 50:
4322
         if r_ground.triggered == False and jump_timer > 53 and frames_since_grinding > 50:
4323
+            if grindDar2.positive:
4324
+                print('grinddaring')
4316
             if lUD > 0.075:
4325
             if lUD > 0.075:
4317
                 if STANCE == 0:
4326
                 if STANCE == 0:
4318
                     force2 = [120, 0, 10]
4327
                     force2 = [120, 0, 10]
4328
+                    #own.applyRotation([0,.5,0], True)
4319
                 if STANCE == 1:
4329
                 if STANCE == 1:
4320
                     force2 = [-120, 0, 10]            
4330
                     force2 = [-120, 0, 10]            
4321
                 
4331
                 
4322
                 own.applyForce(force2, True)
4332
                 own.applyForce(force2, True)
4323
                 own['no_grind_pull'] = 1
4333
                 own['no_grind_pull'] = 1
4334
+        if r_ground.triggered == False and jump_timer > 53 and frames_since_grinding > 50:
4335
+            if grindDar2.positive:
4336
+                print('grinddaring')
4337
+            if lUD < -0.075:
4338
+#                if STANCE == 0:
4339
+#                    force2 = [-120, 0, 10]
4340
+#                    #own.applyRotation([0,.5,0], True)
4341
+#                if STANCE == 1:
4342
+#                    force2 = [120, 0, 10]            
4343
+#                
4344
+#                own.applyForce(force2, True)
4345
+                own['no_grind_pull'] = 1                
4324
         if r_ground.triggered == False and jump_timer > 10 and lUD > 0.075 and frames_since_grinding > 50:
4346
         if r_ground.triggered == False and jump_timer > 10 and lUD > 0.075 and frames_since_grinding > 50:
4325
             if STANCE == 0:
4347
             if STANCE == 0:
4326
                 force2 = [7, 0, 10]
4348
                 force2 = [7, 0, 10]
4446
     if (grindDar == False and r_ground.triggered and own['grindTouch'] == False) or own['jump_timer'] > 40:
4468
     if (grindDar == False and r_ground.triggered and own['grindTouch'] == False) or own['jump_timer'] > 40:
4447
         own['grindType'] = ''
4469
         own['grindType'] = ''
4448
         
4470
         
4449
-    #print('q1:', q1oncd, 'q2:', q2oncd, 'q3:', q3oncd, 'q4:', q4oncd, 'q5:', q5oncd, 'q6:', q6oncd, 'q7:', q7oncd, 'q8:', q8oncd)     
4471
+    #print('q1:', q1oncd, 'q2:', q2oncd, 'q3:', q3oncd, 'q4:', q4oncd, 'q5:', q5oncd, 'q6:', q6oncd, 'q7:', q7oncd, 'q8:', q8oncd)   
4472
+    
4473
+    dict['walk'] = 0  

+ 15
- 2
menuV3.py View File

495
             b -= .1    
495
             b -= .1    
496
         dict['cam_max'] = round(b,2) 
496
         dict['cam_max'] = round(b,2) 
497
         
497
         
498
+    if funct == 'target height':
499
+        b = dict['cch_targetHeight']
500
+        if motion == 'inc':
501
+            b += .05
502
+        else:
503
+            b -= .05    
504
+        dict['cch_targetHeight'] = round(b,3) 
505
+            
506
+        
507
+#cch_targetHeight        
508
+        
498
     if funct == 'recorder on':
509
     if funct == 'recorder on':
499
         if motion == 'inc':
510
         if motion == 'inc':
500
             cam['recorder_on'] = 1
511
             cam['recorder_on'] = 1
708
     if dict['mlevel'] == 2:
719
     if dict['mlevel'] == 2:
709
         if dict['lv1_opt'] == 'camera':
720
         if dict['lv1_opt'] == 'camera':
710
         #if opt == 'settings':
721
         #if opt == 'settings':
711
-            dict['current_list'] = ['cam height', 'focal length', 'min dist', 'max dist']            
722
+            dict['current_list'] = ['cam height', 'focal length', 'min dist', 'max dist', 'target height']            
712
             
723
             
713
 
724
 
714
     if dict['mlevel'] == 3:
725
     if dict['mlevel'] == 3:
854
     dict['mlevel'] = 0
865
     dict['mlevel'] = 0
855
     dict['current_opt'] = ''
866
     dict['current_opt'] = ''
856
     dict['pause_menu_text'] = ''
867
     dict['pause_menu_text'] = ''
857
-    dict['menu_end_points'] = ['exit', 'restart', 'shirt color r', 'shirt color g', 'shirt color b', 'shoe color r', 'shoe color g', 'shoe color b','deck color r', 'deck color g', 'deck color b', 'shirt logo', 'brightness / contrast on', 'brightness value', 'contrast value', 'hdr on', 'avgL', 'hdr strength', 'ao on', 'ao radius', 'ao width', 'ao only', 'dof on', 'sun strength', 'sun rot x', 'sun rot y', 'shadow on', 'ambient strength', 'Demo Scene', 'Empty Lot', 'Park A', 'Training', 'Spine', 'Warehouse', 'Shop', '1920x1080', '1280x720', '1024x768', '800x600', 'fullscreen', 'bloom on', 'cam height', 'focal length', 'min dist', 'max dist', 'enter replay', 'recorder on', 'record length', 'enter replay (press back button)', 'recorder on', 'record length (n/a)', 'physics', 'fxaa on', 'fxaa span max',] + player_list
868
+    dict['menu_end_points'] = ['exit', 'restart', 'shirt color r', 'shirt color g', 'shirt color b', 'shoe color r', 'shoe color g', 'shoe color b','deck color r', 'deck color g', 'deck color b', 'shirt logo', 'brightness / contrast on', 'brightness value', 'contrast value', 'hdr on', 'avgL', 'hdr strength', 'ao on', 'ao radius', 'ao width', 'ao only', 'dof on', 'sun strength', 'sun rot x', 'sun rot y', 'shadow on', 'ambient strength', 'Demo Scene', 'Empty Lot', 'Park A', 'Training', 'Spine', 'Warehouse', 'Shop', '1920x1080', '1280x720', '1024x768', '800x600', 'fullscreen', 'bloom on', 'cam height', 'focal length', 'min dist', 'max dist', 'enter replay', 'recorder on', 'record length', 'enter replay (press back button)', 'recorder on', 'record length (n/a)', 'physics', 'fxaa on', 'fxaa span max', 'target height'] + player_list
858
     
869
     
859
 def output(dict):
870
 def output(dict):
860
     try:
871
     try:
965
             outp = outp + '(2.4): ' + str(dict['cam_max'])  
976
             outp = outp + '(2.4): ' + str(dict['cam_max'])  
966
         if dict['current_opt'] ==  'recorder on':
977
         if dict['current_opt'] ==  'recorder on':
967
             outp = outp + ': ' + str(dict['recorder_on']) 
978
             outp = outp + ': ' + str(dict['recorder_on']) 
979
+        if dict['current_opt'] ==  'target height':
980
+            outp = outp + ': ' + str(dict['cch_targetHeight'])             
968
 #        if dict['current_opt'] ==  'character':
981
 #        if dict['current_opt'] ==  'character':
969
 #            outp = outp + ': ' + str(dict['character'])             
982
 #            outp = outp + ': ' + str(dict['character'])             
970
                                 
983
                                 

+ 2
- 1
walk.py View File

291
         #print('minusvel', velx)
291
         #print('minusvel', velx)
292
     else:
292
     else:
293
         #pass
293
         #pass
294
-        print('minusvel')
294
+        #print('minusvel')
295
         if own.linearVelocity.x > .1 or own.linearVelocity.x < -.1:
295
         if own.linearVelocity.x > .1 or own.linearVelocity.x < -.1:
296
             own.linearVelocity.x *= .01
296
             own.linearVelocity.x *= .01
297
         else:
297
         else:
1255
 own['lastbkBut'] = bkBut
1255
 own['lastbkBut'] = bkBut
1256
 own['dropinCol'] = dropinCol
1256
 own['dropinCol'] = dropinCol
1257
 own['walk'] = 1
1257
 own['walk'] = 1
1258
+dict['walk'] = 1
1258
     
1259
     

Loading…
Cancel
Save