|
@@ -4514,6 +4514,7 @@ def main():
|
4514
|
4514
|
localRay = groundRay
|
4515
|
4515
|
own['vert'] = 0
|
4516
|
4516
|
own['transition'] = False
|
|
4517
|
+ aligned = False
|
4517
|
4518
|
#if localRay[0] or grindRay[0]:
|
4518
|
4519
|
if localRay[0]:
|
4519
|
4520
|
|
|
@@ -4540,6 +4541,7 @@ def main():
|
4540
|
4541
|
if localRay[2] != [0, 0, -1]:
|
4541
|
4542
|
#own.alignAxisToVect(localRay[2], 2, .25)
|
4542
|
4543
|
own.alignAxisToVect(localRay[2], 2, .5)
|
|
4544
|
+ aligned = True
|
4543
|
4545
|
#print('localRay')
|
4544
|
4546
|
|
4545
|
4547
|
|
|
@@ -4569,6 +4571,7 @@ def main():
|
4569
|
4571
|
#print('moving new rayb')
|
4570
|
4572
|
if localRay[2] != [0, 0, -1] and grindHit == 0:
|
4571
|
4573
|
own.alignAxisToVect(localRay[2], 2, .25)
|
|
4574
|
+ aligned = True
|
4572
|
4575
|
|
4573
|
4576
|
else:
|
4574
|
4577
|
#print('vh')
|
|
@@ -4583,13 +4586,15 @@ def main():
|
4583
|
4586
|
localHitDist = Vector.copy(Start - localRay_v[1]).length
|
4584
|
4587
|
own.linearVelocity.x *= .98
|
4585
|
4588
|
own.linearVelocity.z = .1
|
4586
|
|
- if localHitDist < .8 and (dict['lUD'] < .04 or dict['lUD'] > -.04):
|
|
4589
|
+ #if localHitDist < .8 and (dict['lUD'] < .04 or dict['lUD'] > -.04):
|
|
4590
|
+ if localHitDist < .8:
|
4587
|
4591
|
#own.applyMovement((0,0,((.4 - (localHitDist) * .1))), True)
|
4588
|
|
- own.applyMovement((0, 0, (.287 - localHitDist)), True)
|
|
4592
|
+ own.applyMovement((0, 0, (.4 - localHitDist)), True)
|
4589
|
4593
|
#print('moving vert ray')
|
4590
|
4594
|
if localRay_v[2] != [0, 0, -1] and grindHit == 0:
|
4591
|
4595
|
#if localRay_v[2] != [0,0,-1]:
|
4592
|
|
- own.alignAxisToVect(localRay_v[2], 2, .3)
|
|
4596
|
+ own.alignAxisToVect(localRay_v[2], 2, .4)
|
|
4597
|
+ aligned = True
|
4593
|
4598
|
#print(own['lGobj'], 'lGobj')
|
4594
|
4599
|
|
4595
|
4600
|
|
|
@@ -4610,14 +4615,16 @@ def main():
|
4610
|
4615
|
if rayf[0]:
|
4611
|
4616
|
print('rayf hit')
|
4612
|
4617
|
own.alignAxisToVect(rayf[2], 2, .2)
|
|
4618
|
+ aligned = True
|
4613
|
4619
|
elif rayb[0]:
|
4614
|
4620
|
own.alignAxisToVect(rayb[2], 2, .2)
|
|
4621
|
+ aligned = True
|
4615
|
4622
|
print('rayb hit')
|
4616
|
4623
|
|
4617
|
4624
|
#print(raytof, raytob)
|
4618
|
4625
|
|
4619
|
|
-
|
4620
|
|
-
|
|
4626
|
+ if not aligned:
|
|
4627
|
+ own.alignAxisToVect([0.0, 0.0, 1.0], 2, .03)
|
4621
|
4628
|
|
4622
|
4629
|
if own.linearVelocity.x > 12:
|
4623
|
4630
|
own.linearVelocity.x = 12
|