Read Gamepad State#

Reads the current state of the ID-specified gamepad device (i.e. which buttons are being pressed, the orientation of the joystick(s), etc.).

Installation#

To use this node enable omni.graph.nodes in the Extension Manager.

Inputs#

Name

Type

Descripton

Default

Deadzone (inputs:deadzone)

float

Threshold from [0, 1] that the value must pass for it to be registered as input.

0.1

Element (inputs:gamepadElement)

token

The gamepad element whose state is to be checked.

Left Stick X Axis

Metadata

displayGroup = parameters

Metadata

allowedTokens = Left Stick X Axis,Left Stick Y Axis,Right Stick X Axis,Right Stick Y Axis,Left Trigger,Right Trigger,Face Button Bottom,Face Button Right,Face Button Left,Face Button Top,Left Shoulder,Right Shoulder,Special Left,Special Right,Left Stick Button,Right Stick Button,D-Pad Up,D-Pad Right,D-Pad Down,D-Pad Left

Gamepad ID (inputs:gamepadId)

uint

Gamepad ID number starting from 0. Used to identify a given gamepad device.

0

Outputs#

Name

Type

Descripton

Default

Is Pressed (outputs:isPressed)

bool

True if the gamepad element is currently pressed, false otherwise.

None

Value (outputs:value)

float

Value denoting how “much” the gamepad element is being pressed. Valid ranges are [0, 1] for buttons and [-1, 1] for stick and trigger.

None

Metadata#

Name

Value

Unique ID

omni.graph.nodes.ReadGamepadState

Version

1

Extension

omni.graph.nodes

Has State?

False

Implementation Language

C++

Default Memory Type

cpu

Generated Code Exclusions

None

uiName

Read Gamepad State

Categories

input:gamepad

Generated Class Name

OgnReadGamepadStateDatabase

Python Module

omni.graph.nodes