從通用控制器/其他操縱桿外圍設備模擬方向盤

從通用控制器/其他操縱桿外圍設備模擬方向盤

所以我拼湊了一個簡陋的(非運動加)WiiMote 並在 Freepie 中編寫了一個可靠的腳本:

# In different places of earth this number will vary, however it is estimated to be 9.81.
accelOverride = 5.25
    
# Log the acceleration value - when placed above a flat surface it should log as a number below 0.8
diagnostics.watch(wiimote[0].acceleration.x-accelOverride)
diagnostics.watch(wiimote[0].acceleration.y-accelOverride)
    
# Define a variable that should help manipulating the Wiimote's X/Y-axis acceleration
# Note: LR is Left/Right and UD is Up/Down
accelLR = wiimote[0].acceleration.y-accelOverride
    
# Establish a small deadzone that should help with the inconsistency of the acceleration of Earth
if accelLR < 0.7 and accelLR > -0.7:
    accelLR = 0
        
# Now log our accel values - the post-processed acceleration value
diagnostics.watch(accelLR)
    
# Now calculate everything
angleLR = filters.ensureMapRange((accelLR), 8, -8, vJoy[0].axisMax*-1, vJoy[0].axisMax)
    
vJoy[0].x = angleLR

它基本上透過獲取 Wiimote 的加速度值並將其映射到(虛擬控制器)左搖桿的 x 軸,使 Wiimote 成為方向盤。所有這一切都很好,但是有些遊戲只允許您同時進行控制器輸入而不允許鍵盤輸入。所以我想知道:是否有軟體或方法可以從完全工作的(虛擬的,不應該產生影響)控制器模擬方向盤?

相關內容