GamepadCode DpadNorth

book_4_sparkGenerated
code_blocksInput

Description

The DpadNorth field is a member of the GamepadCode enumeration in the Sandbox namespace. It represents the directional pad's north (up) button on a game controller. This enumeration is used to identify specific buttons and controls on a gamepad, allowing developers to handle input from game controllers effectively.

Usage

Use the DpadNorth field when you need to detect or respond to the north (up) direction of a game controller's D-pad. This can be useful in scenarios where you want to move a character or navigate a menu upwards in response to user input.

Example

// Example of checking if the DpadNorth button is pressed
if (Input.IsGamepadButtonDown(GamepadCode.DpadNorth))
{
    // Move character or navigate menu upwards
    MoveCharacterUp();
}