> ## 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.

# XINPUT_VIBRATION

> XINPUT_VIBRATION

# XINPUT\_VIBRATION

描述雙馬達控制器震動功能的馬達速度。

## 語法

```cpp theme={null}
typedef struct XINPUT_VIBRATION {  
    WORD wLeftMotorSpeed;  
    WORD wRightMotorSpeed;  
} XINPUT_VIBRATION  
```

### 成員

*wLeftMotorSpeed*\
類型：WORD

左側馬達的速度。有效值範圍為 0 到 65535。零表示完全不使用馬達，65535 表示以 100% 使用馬達。

*wRightMotorSpeed*\
類型：WORD

右側馬達的速度。有效值範圍為 0 到 65535。零表示完全不使用馬達，65535 表示以 100% 使用馬達。

## 備註

左側馬達為低頻震動馬達。右側馬達為高頻震動馬達。這兩個馬達並不相同，會產生不同的震動效果。

此結構由 [XInputSetState](https://docs.xbox.com/zh-TW/reference/input/xinputongameinput/functions/xinputsetstate.md) 函式使用。

如需詳細資訊，請參閱 [XInputOnGameInput 包裝函式](https://docs.xbox.com/zh-TW/build/core-features/common/input/porting/input-porting-xinput.md#xinputWrapperSection)。

## 需求

**標頭：** XInputOnGameInput.h

**支援的平台：** XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[XInputSetStateEx](https://docs.xbox.com/zh-TW/reference/input/xinputongameinput/functions/xinputsetstateex.md)\
[從 XInput 移植到 GameInput](https://docs.xbox.com/zh-TW/build/core-features/common/input/porting/input-porting-xinput.md)\
[XInputOnGameInput](https://docs.xbox.com/zh-TW/reference/input/xinputongameinput/xinputongameinput_members.md)


## Related topics

- [XInputSetState](https://docs.xbox.com/zh-TW/reference/input/xinputongameinput/functions/xinputsetstate.md)
- [XInputOnGameInput (API 內容)](https://docs.xbox.com/zh-TW/reference/input/xinputongameinput/xinputongameinput_members.md)
- [XINPUT_CAPABILITIES](https://docs.xbox.com/zh-TW/reference/input/xinputongameinput/structs/xinput_capabilities.md)
- [XINPUT_VIBRATION_EX](https://docs.xbox.com/zh-TW/reference/input/xinputongameinput/structs/xinput_vibration_ex.md)
- [XInputSetStateEx](https://docs.xbox.com/zh-TW/reference/input/xinputongameinput/functions/xinputsetstateex.md)
