flightsim

Code (csharp):
  1. // -------------------- Kalkulationen Salto vorwärts abblocken / Calculations Block salto forward -----------------------------------------------------
  2.        
  3.          // Variable divesalto
  4.          //  sturzflug salto vorwärts blocken || dive salto forward blocking
  5.          if  (rotationx  <  90 ) divesalto =rotationx / 100.0; //Updown
  6.          if  (rotationx  >  90 ) divesalto =- 0.2; //Updown
  7.        
  8.          //Variable diveblocker
  9.          // Blockt seitlichenTaumelflug beim Sturzflug || blocks sideways stagger flight while dive
  10.          if  (rotationx  < 90 ) diveblocker =rotationx / 200.0;
  11.          else diveblocker = 0;
  12.  
  13.          //----------------------------Alles zurückdrehen / everything rotate back ---------------------------------------------------------------------------------
  14.        
  15.          // Zurückrotieren wenn Key in die andere Richtung zeigt | rotateback when key wrong direction
  16.          if  ( (rotationz  < 180 ) ( Input. GetAxis  ( "Horizontal" ) > 0 ) ) transform. Rotate ( 0, 0,rightleftsoft * Time. deltaTime * 80 );
  17.          if  ( (rotationz  > 180 ) ( Input. GetAxis  ( "Horizontal" ) < 0 ) ) transform. Rotate ( 0, 0,rightleftsoft * Time. deltaTime * 80 );
  18.  
  19.          //Zurückdrehen Z Achse generell. Limitiert auf Horizontal Button ist nicht gedrückt
  20.          //Rotate back in z axis general, limited by no horizontal button pressed
  21.          if  ( ! Input. GetButton  ( "Horizontal" ) ) {
  22.              if  ( (rotationz  <  135 ) ) transform. Rotate ( 0, 0,rightleftsoftabs * Time. deltaTime *- 100 );
  23.              if  ( (rotationz  >  225 ) ) transform. Rotate ( 0, 0,rightleftsoftabs * Time. deltaTime * 100 );
  24.              }
  25.            
  26.          //Zurückdrehen X Achse || Rotate back X axis
  27.          if  ( ( ! Input. GetButton  ( "Vertical" ) ) (groundtrigger. triggered == 0 ) ) {
  28.              if  ( (rotationx  > 0 ) (rotationx  <  180 ) ) transform. Rotate ( Time. deltaTime *- 50, 0, 0 );
  29.              if  ( (rotationx  > 0 ) (rotationx  >  180 ) ) transform. Rotate ( Time. deltaTime * 50, 0, 0 );
  30.              }
  31.            
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值