GamepadCode DpadEast

book_4_sparkGenerated
code_blocksInput

Description

The DpadEast field is a member of the GamepadCode enumeration in the Sandbox namespace. It represents the directional pad (D-pad) button on a game controller that points east (right). This is typically used to detect when the right direction on the D-pad is pressed.

Usage

Use the DpadEast field to check if the east direction on the D-pad is being pressed in your game logic. This can be useful for handling player input, such as moving a character to the right or navigating menus.

Example

// Example of checking if the DpadEast button is pressed
if (Input.IsGamepadButtonDown(GamepadCode.DpadEast))
{
    // Move the player character to the right
    player.MoveRight();
}