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

# XINPUT_VIBRATION

> XINPUT_VIBRATION

# XINPUT\_VIBRATION

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

<a id="syntaxSection" />

## 語法

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

<a id="membersSection" />

### 成員

*wLeftMotorSpeed*\
類型：WORD

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

*wRightMotorSpeed*\
類型：WORD

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

<a id="remarksSection" />

## 備註

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

此結構由 [XInputSetState](/zh-TW/reference/input/xinputongameinput/functions/xinputsetstate) 函式使用。

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

<a id="requirementsSection" />

## 需求

**標頭：** XInputOnGameInput.h

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

<a id="seealsoSection" />

## 另請參閱

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


## Related topics

- [XInputSetState](/zh-TW/reference/input/xinputongameinput/functions/xinputsetstate.md)
- [XInputOnGameInput](/zh-TW/reference/input/xinputongameinput/xinputongameinput_members.md)
- [XINPUT_CAPABILITIES](/zh-TW/reference/input/xinputongameinput/structs/xinput_capabilities.md)
- [XINPUT_VIBRATION_EX](/zh-TW/reference/input/xinputongameinput/structs/xinput_vibration_ex.md)
- [XInputSetStateEx](/zh-TW/reference/input/xinputongameinput/functions/xinputsetstateex.md)
