Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
molton's avatar
molton
Explorer
11 years ago

OVRGamepadController.cs issue

Hello, I'm not quite sure if this is a bug or I'm missing something, but I use the left and right buttons for certain functions in my program and it seems that they've been ommitted from the OVRGamepadController.cs script, it goes from up and down to left and right shoulder buttons, I need the left and right directional pad input.
public enum Axis
{
None = -1,
LeftXAxis = 0,
LeftYAxis,
RightXAxis,
RightYAxis,
LeftTrigger,
RightTrigger,
Max,
};

public enum Button
{
None = -1,
A = 0,
B,
X,
Y,
Up,
Down,
LeftShoulder,
RightShoulder,
Start,
Back,
LStick,
RStick,
L1,
R1,
Max
};

public static string[] DefaultAxisNames = new string[(int)Axis.Max]
{
"Left_X_Axis",
"Left_Y_Axis",
"Right_X_Axis",
"Right_Y_Axis",
"LeftTrigger",
"RightTrigger",
};

public static string[] DefaultButtonNames = new string[(int)Button.Max]
{
"Button A",
"Button B",
"Button X",
"Button Y",
"Up",
"Down",
"Left Shoulder",
"Right Shoulder",
"Start",
"Back",
"LStick",
"RStick",
"LeftShoulder",
"RightShoulder",

4 Replies

Replies have been turned off for this discussion
  • You can probably just edit them back in.

    I can ask to see why they would have been removed.
  • I ran into this today it's an easy fix, looks like someone forgot to check the names after a copy an paste.

    Just change all the strings and enum values immediately after Up/down to be Left/Right instead of 'Left Shoulder' etc...