Unity 羅技G29接入.md

Unity 羅技G29接入

Unity 羅技G29接入

一、 使用Unity Standard Assets中的CrossPlatformInputManager

InputManger設置

InputManager1
InputManager1

InputMnanger2
InputMnanger2

Code

float wheel = CrossPlatformInputManager.GetAxis("G29 Horizontal Steer");
float throttle = CrossPlatformInputManager.GetAxis("G29 Vertical Throttle");
float footbrake = CrossPlatformInputManager.GetAxis("G29 Vertical Brake");
float cluch = CrossPlatformInputManager.GetAxis("G29 Vertical Clutch

二、使用Rewired插件

Rewired是一套非常便捷的輸入控制插件,支持數百種設備,包括:鍵盤,手柄、模擬器等。
下載地址:Rewired

Actions

Actions
Actions

Joystick Maps

Joystick Maps
Joystick Maps

三、其他鍵位

可參考xbox手柄配置:
https://blog.csdn.net/u014635337/article/details/76273323

XBOX
XBOX

配置 說明
Gravity 設備靜止時輸出值下降的速度(/秒)。僅在 Type 爲 key/mouse button 時使用
Dead 任何小於此數字的正值或負值都將註冊爲零。對搖桿很有用。
Sensitivity 對於鍵盤輸入,較大的值將導致更快的響應時間。較低的值會更平滑。對於鼠標增量,該值將縮放實際鼠標增量。
Snap 如果啓用,軸值將在接收到相反輸入後立即重置爲零。僅在 Type 爲 key/mouse button 時使用
Invert 如果啓用,正按鈕將向軸發送負值,反之亦然。
Type 輸入類型 按鍵/鼠標/搖桿 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章