通过通用控制器/其他操纵杆外围设备模拟方向盘

通过通用控制器/其他操纵杆外围设备模拟方向盘

因此,我拼凑了一个简陋的(非运动加)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 成为一个方向盘。所有这些都很好,但是有些游戏只允许您同时进行控制器输入而没有键盘输入。所以我想知道:是否有软件或方法可以通过功能齐全的(虚拟的,应该没有区别)控制器模拟方向盘?

相关内容