> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GetControllerAxisState

> IGameInputReading::GetControllerAxisState

# IGameInputReading::GetControllerAxisState

ゲーム コントローラーから軸の状態情報を取得します。

## 構文

```cpp theme={null}
uint32_t GetControllerAxisState(
    uint32_t stateArrayCount,
    float* stateArray
);
```

### パラメーター

*stateArrayCount*   \_In\_\
型: uint32\_t

ゲーム コントローラー上の軸をキャプチャするために期待される状態配列の数です。
この数は [IGameInputReading::GetControllerAxisCount](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrolleraxiscount.md) から取得できます。

*stateArray*   \_Out\_writes\_(stateArrayCount)
型: float\*

軸の状態データを含む配列へのポインターです。

### 戻り値

型: uint32\_t

有効なバッファー エントリの数を返します。

## 解説

ゲーム コントローラー上のほとんどのアナログ コントロール (ジョイスティック、トリガー、スライダー、ダイヤルなど) は軸として公開されます。これは、\[0.0, 1.0] の範囲に線形に正規化された浮動小数点値です。ほとんどのデジタル入力はボタンとして公開され、単純なブール値になります。ハット スイッチはスイッチ値として公開され、その位置は [GameInputSwitchPosition](https://docs.xbox.com/ja-jp/reference/input/gameinput/enums/gameinputswitchposition.md) 列挙値のいずれかで表されます。

## 要件

**ヘッダー:** GameInput.h

[Input API の概要](https://docs.xbox.com/ja-jp/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputReading](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputreading/igameinputreading.md)

## バージョン履歴

| バージョン | 変更点 |
| - | - |
| **v0** | 導入。 |


## Related topics

- [GetControllerAxisCount](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrolleraxiscount.md)
- [GetControllerButtonState](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerbuttonstate.md)
- [GetControllerSwitchState](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerswitchstate.md)
- [GameInputControllerAxisInfo (非推奨)](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/structs/gameinputcontrolleraxisinfo.md)
- [Axis](https://docs.xbox.com/ja-jp/reference/system/touchadaptationkit/types/game-streaming-touch-axis.md)
