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

# IGameInputReading::GetControllerAxisState

> IGameInputReading::GetControllerAxisState

# IGameInputReading::GetControllerAxisState

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

## 構文

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

### パラメーター

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

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

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

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

### 戻り値

型: uint32\_t

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

## 解説

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

## 要件

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

[Input API の概要](/build/core-features/common/input/overviews/input-overview)\
[IGameInputReading](/reference/input/gameinput/interfaces/igameinputreading/igameinputreading)

## バージョン履歴

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


## Related topics

- [IGameInputReading::GetControllerAxisCount](/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrolleraxiscount.md)
- [IGameInputReading::GetControllerButtonState](/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerbuttonstate.md)
- [IGameInputReading::GetControllerSwitchState](/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerswitchstate.md)
- [IGameInputReading::GetControllerButtonCount](/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerbuttoncount.md)
- [IGameInputReading::GetControllerSwitchCount](/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerswitchcount.md)
