Announcement

Collapse
No announcement yet.

Gamepad Movement Demonstration

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Gamepad Movement Demonstration

    I've reconfigured the controller a little (more ergonomic layout), made it possible to dodge in any direction. Seperated the Dodge and Jump button. Also added my jumpjetting mutator to the mix for a bit of dodge-jumping.

    Did a quick test to see how it works out and what you can really do with a gamepad.

    http://www.youtube.com/watch?v=6Otvr..._order&list=UL

    #2
    Originally posted by HideInLight View Post
    I've reconfigured the controller a little (more ergonomic layout), made it possible to dodge in any direction. Seperated the Dodge and Jump button. Also added my jumpjetting mutator to the mix for a bit of dodge-jumping.

    Did a quick test to see how it works out and what you can really do with a gamepad.

    http://www.youtube.com/watch?v=6Otvr..._order&list=UL
    Hmm... is it possible to do the opposite with the PS3 version, make it so that I can use double tap dodge on the keyboard?

    Comment


      #3
      Originally posted by Gameslaya View Post
      Hmm... is it possible to do the opposite with the PS3 version, make it so that I can use double tap dodge on the keyboard?
      If that was an option I might load up my ps3 version some time

      Comment


        #4
        Originally posted by Random54 View Post
        If that was an option I might load up my ps3 version some time
        And if auto-aiming was disabled, that would be an absolute godsend as well. It's kind of annoying when your mouse fights against you in deathmatch.

        Comment


          #5
          You know what's funny, with me trying to figure why I couldn't get the class extended I ran into the source code of someone who had the same idea as me regarding the smartjump and he actually had sorted it out already including the double tap WSAD problem.

          And the mutator was dated 08/20/2008
          http://ut3gow.com/node/307

          Although I'm not sure if it was added later on that it went unnoticed.

          Comment


            #6
            Here's the source code, so if you can find someone still capable of cooking it for the PS3 go ahead. Should make double tapping WSAD possible. Modify and do with it whatever you want.

            SmartJumpPc.uc
            Code:
            class SmartJumpPC extends UTMutator;
            
            function InitMutator(string Options, out string ErrorMessage)
            {
            	Super.InitMutator(Options, ErrorMessage);
            }
            
            simulated function PostBeginPlay()
            {
            	local UTGame Game;
            	Super.PostBeginPlay();
            	
            
            
            	Game = UTGame( WorldInfo.Game );
            	if ( Game != None )
            	{
            		Game.PlayerControllerClass=Class'SmartJumpPC.NewConsolePlayerController';
            	}
            
            }
            NewConsolePlayerInput.uc
            Code:
            class NewConsolePlayerInput extends UTConsolePlayerInput within NewConsolePlayerController;
            
            exec function SmartJump()
            {
            	local UTPawn P;
            	local byte bOldDuck;
            
            	// ducking is automatic on console, so don't let jumping reset it
            	bOldDuck = bDuck;
            
            	//`log( "I am smart jumping!!!!" );
            	// jump cancels feign death
            	P = UTPawn(Pawn);
            	if (P != None && P.bFeigningDeath)
            	{
            		P.FeignDeath();
            	}
            	else
            	{
            		//`log( "   aForward+aBaseY: " $ aForward+aBaseY $
            		//	  " abs(aStrafe): " $ abs(aStrafe) $
            		//	  " abs(aForward+aBaseY)): " $ abs(aForward+aBaseY) $
            		//	  " (abs(aStrafe) > abs(aForward+aBaseY)): " $ (abs(aStrafe) > abs(aForward+aBaseY)) );
            
            
            		//`log( "   ( RawJoyUp < -DeadZoneThreshold ) : " $ ( RawJoyUp < -LeftThumbStickDeadZoneThreshold ) $
            		//	" ( RawJoyRight < -DeadZoneThreshold ): " $ ( RawJoyRight < -LeftThumbStickDeadZoneThreshold ) $
            		//	" ( RawJoyRight > DeadZoneThreshold ): " $ ( RawJoyRight > LeftThumbStickDeadZoneThreshold ) $
            		//	" ( RawJoyRight < -DeadZoneThreshold ) || ( RawJoyRight > LeftThumbStickDeadZoneThreshold ): " $ ( RawJoyRight < -LeftThumbStickDeadZoneThreshold ) || ( RawJoyRight > LeftThumbStickDeadZoneThreshold ) );
            
            		// determine is dodging or jumping backwards or just doing a normal jump
            		if( RawJoyRight < -Dodge_Threshold )
            		{
            			//`log( "   SmartJump left " $ RawJoyRight );
            			ForcedDoubleClick = DCLICK_Left;
            		}
            		else if( RawJoyRight > Dodge_Threshold )
            		{
            			//`log( "   SmartJump right " $ RawJoyRight );
            			ForcedDoubleClick = DCLICK_Right;
            		}
                            else if( RawJoyUp > Dodge_Threshold )
            		{
            			//`log( "   SmartJump forward " $ RawJoyUp );
            			ForcedDoubleClick = DCLICK_Forward;
            		}
                            else if( RawJoyUp < -Dodge_Threshold )
            		{
            			//`log( "   SmartJump back " $ RawJoyUp);
            			ForcedDoubleClick = DCLICK_Back;
            		}
              		else
              		{
            			//`log( "jump jump" );
            			super.jump();
              		}
            	}
            
            	bDuck = bOldDuck;
            }
            
            function Actor.EDoubleClickDir CheckForDoubleClickMove(float DeltaTime)
            {
                if (bUsingGamepad)
                {
                    return super.CheckForDoubleClickMove(DeltaTime);
                }
                else
                {
                    return super(PlayerInput).CheckForDoubleClickMove(DeltaTime);
                }
            }
            NewConsolePlayerController.uc
            Code:
            class NewConsolePlayerController extends UTConsolePlayerController;
            
            function ResetPlayerMovementInput()
            {
            	local UTConsolePlayerInput ConsoleInput;
            
            	Super.ResetPlayerMovementInput();
            	`log("working");
            
            	ConsoleInput = UTConsolePlayerInput(PlayerInput);
            	if (ConsoleInput != None)
            	{
            		ConsoleInput.ForcedDoubleClick = DCLICK_None;
            	}
            }
            
            defaultproperties
            {
            	InputClass=class'SmartjumpPC.NewConsolePlayerInput'
            }

            Comment


              #7
              The WSAD fix is highlighted in green.

              Comment


                #8
                Originally posted by HideInLight View Post
                The WSAD fix is highlighted in green.
                YES!!!!!!!!!!!

                Now, I just gotta learn how to do the PS3 cooking dealie. I'll probably do it after finals....

                Comment


                  #9
                  Anyone have a clue where the "huge hitboxes" bit of code for the consoles is hiding?

                  Comment


                    #10
                    Originally posted by HideInLight View Post
                    Anyone have a clue where the "huge hitboxes" bit of code for the consoles is hiding?
                    I'm not sure if its similar in ut3 but it as easy in ue2.5 http://udn.epicgames.com/Two/PawnTri...he_Set_Command

                    Comment

                    Working...
                    X