Forum Discussion

Martok's avatar
Martok
Member
30 days ago

OnButtonDown

When you use code blocks in the VR editor you can use three button down events, one for button 1, one for button 2 and one just for button and you choose which button.

I'm now scripting in the Desktop editor and I see OnButton1Down, OnButton2Down but I can't find a OnButtonDown where you can see which of the four buttons was pressed. 

Now I would find it strange if we have the button down for four buttons in de VR editor and not in the desktop editor through scripting, so I'm wondering if I'm missing something.

Does anyone have an Idea about how you can see if it's button A, B, X, or Y that is pressed?

1 Reply

  • Hello!

    The Player Input Action Reference page is useful for identifying which controller buttons are pressed, such as LeftPrimary, LeftSecondary, RightPrimary, and RightSecondary. You can use these enum values in your scripts to trigger actions based on user input.

    If you need more assistance or have any questions, please feel free to reach out.