UE3 - UDK Binding Razer Hydra buttons to Game Actions

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Cymatic

New Member
Feb 24, 2013
3
0
0
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
 

Nathaniel3W

Member
Nov 11, 2012
48
0
6
I don't think you need to mess with any .ini files to get your character to jump. If you're able to get readings from the Hydra's buttons, I think you can just put code into your PlayerController class to call Jump() or call the pawn's DoJump() function. If you have all of this code working....
http://forums.epicgames.com/threads...layer-Input-and-Player-Controller-Ready-to-go

Then you should be able to just add this into, say for example, the RightB1Press() function:
Code:
function RightB1Press()
{
     Jump();
     // or maybe it's Pawn.DoJump() I'll try it out when I get back to my programming computer.
}
 

Cymatic

New Member
Feb 24, 2013
3
0
0
Awesome, thanks Nathaniel3w! I was going about it the wrong way, trying to dig into the config system. I didn't realize that config was limited to mouse/keyboard/xinput.

I will be trying this out tonight! Thanks for the help!

--Cymatic Bruce
 

Cymatic

New Member
Feb 24, 2013
3
0
0
All right. Confirmed!

If you are using the code from the epic games thread, 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