About Store Forum Documentation Contact



Post Reply 
[Info] Question Fly-Angle-Run
Author Message
Jben Offline
Member

Post: #1
[Info] Question Fly-Angle-Run
Hello everyone.

How to decrease the angle of the automatic character Fly mode => Run (W button) ?

Thanks ! smile
02-06-2015 07:06 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Jben Offline
Member

Post: #2
RE: [Info] Question Fly-Angle-Run
[Image: 336190anglefly.jpg]
(This post was last modified: 02-09-2015 07:50 PM by Jben.)
02-09-2015 07:49 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Pherael Offline
Member

Post: #3
RE: [Info] Question Fly-Angle-Run
Well, I'm not sure since I never used flying but I made quick look and you probably need to overwrite in ChrBase function updateController()

I think you could change this line
Code:
if(!ctrl.flying())
      {
         ay   =0;
         dir.y=0;
      }

to something like
Code:
if(!ctrl.flying())
      {
         ay   =0;
         dir.y=0;
}else{
         ay   /=2.0;
        dir.y/=2.0;}

Didn't test it.
(This post was last modified: 02-09-2015 08:25 PM by Pherael.)
02-09-2015 08:10 PM
Find all posts by this user Quote this message in a reply
Jben Offline
Member

Post: #4
RE: [Info] Question Fly-Angle-Run
Thanks Pherael, Sorry i use Ineisis code sources, Ineisis as not this lines in original code source. I try your code, no work :/
02-17-2015 08:40 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Pherael Offline
Member

Post: #5
RE: [Info] Question Fly-Angle-Run
Well, I made little mistake, there is no ChrBase class in EE, only Game.Chr (I have my own class for charcters)

So I take another look in code, and in Game.Chr ( I belive is used in Inesis too) in function updateAnimationAnim() there is

Code:
// flying
   {
      AdjustValTime(anim.fly, ctrl.flying(), 0.001f);
      if(anim.fly>EPSL)
      {
         Bool fly_full_body=(input.move.z==1 && running);

         Flt desired_strafe=(fly_full_body ?     input_move.x*PI_4 : 0),
             desired_x     =(fly_full_body ? 0 : input_move.x*-0.3f   ),
             desired_z     =(fly_full_body ? (PI_2-0.2f)-Max(input_move.y, -0.5f)*PI_4 : input_move.z*0.3f); // use 'Max' to avoid "neck breaks"

         AdjustValTime(anim.fly_x        , desired_x                            , 0.02f);
         AdjustValTime(anim.fly_z        , desired_z                            , 0.02f);
         AdjustValTime(anim.fly_strafe   , desired_strafe                       , 0.02f);
         AdjustValTime(anim.fly_full_body, fly_full_body                        , 0.02f);
         AdjustValTime(anim.fly_turn     , fly_full_body ? input.turn.x*PI_6 : 0, 0.05f);
      }else
      {
         anim.fly_x        =0;
         anim.fly_z        =0;
         anim.fly_strafe   =0;
         anim.fly_turn     =0;
         anim.fly_full_body=0;
      }
   }
desired_z is what you looking for, this is the char angle when flying
(I just divide it by 4 to quick test and it works)
(This post was last modified: 02-17-2015 09:34 PM by Pherael.)
02-17-2015 09:32 PM
Find all posts by this user Quote this message in a reply
Post Reply