Announcement

Collapse
No announcement yet.

[Solved] Binding Razer Hydra buttons to Game Actions

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

    [Solved] Binding Razer Hydra buttons to Game Actions

    Hi All!

    I am struggling with binding the buttons on the Razer Hydra to a game action (like press button 1 on left hydra controller to do command "GBA_Jump").

    I followed some tutorials and managed to move and aim with the Hydra joysticks and controller motion. These actions are handled within the code, not DefaultInput.ini. The standard binding command in the ini is:

    Code:
    Bindings=(Name="XboxTypeS_B",Command="Jump")
    What am I replacing "XboxTypeS_B" with to get the Hydra's buttons recognized?

    Thanks for the help!

    --Bruce

    #2
    [Tutorial] Razer Hydra Dll Bind Player Input and Player Controller. Ready to go.

    Comment


      #3
      Thanks, this is actually one of the tutorials I used, but it does not have an example of a custom button bind.
      Perhaps it would be better to post this question there.

      Comment


        #4
        I'm not quite sure what you mean? Everything is ready to have functions assigned in the player controller class.

        Comment


          #5
          From what the code looks like, you can't use the config system with that and assign/call the functions that you want to be called when certain buttons are pressed etc.

          e.g.
          Originally posted by skwisdemon666 View Post
          Code:
          **
           *	RazerHydraPlayerController
           *
           *	Creation date: 01/18/2013 03:39
           *	Copyright 2013, Craig A DeLancy
           */
          
          class RazerHydraPlayerController extends GamePlayerController;
          
          function RightStartPress()
          {
          	yourFunctionThatDoesSomethingAwesome();
          }

          Comment


            #6
            Originally posted by skwisdemon666 View Post
            I'm not quite sure what you mean? Everything is ready to have functions assigned in the player controller class.
            Ah, I think I was going about things the wrong way. I was attempting to use the config system (DefaultInput.ini) to bind button presses. So instead, I should call an exec function like Jump or StartFire within the player controller class?

            Comment


              #7
              No, you can't use the config system. The config system is only good for keyboard, mouse, and xinput devices.

              Comment


                #8
                Cool, thanks for the advice, and thanks again for putting up your tutorial.

                Comment


                  #9
                  I'm actually getting ready to put up an updated version, if I can figure out what I just did that broke everything...

                  Comment


                    #10
                    Oh man, I hate it when that happens. If it wasn't for GitHub, I might have torn my hair out by now.

                    I will certainly be looking forward to the update!

                    EDIT:
                    Confirmed the solution:

                    It seems I was over thinking this, its as simple as calling a Pawn instance function within a button press function. For example:

                    Code:
                    function LeftB1Press()
                    {
                    	Pawn.DoJump(true);
                    }
                    A list of Pawn instance functions is here.

                    For other newcomers to Hydra/UDK/UnrealScript, I am keeping a dev journal on my blog and posting my code to GitHub.
                    Eventually I will combine the blog entries into a comprehensive tutorial for beginners.
                    Happy coding everyone!

                    --Cymatic Bruce

                    Comment

                    Working...
                    X