일반 컨트롤러/기타 조이스틱 주변 장치에서 스티어링 휠을 에뮬레이트합니다.

일반 컨트롤러/기타 조이스틱 주변 장치에서 스티어링 휠을 에뮬레이트합니다.

그래서 저는 모션 플러스가 아닌 겸손한 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를 스티어링 휠로 만듭니다. 이 모든 것이 좋지만 일부 게임에서는 컨트롤러 입력만 허용하고 동시에 키보드 입력은 허용하지 않습니다. 그래서 저는 완전히 작동하는(가상, 차이가 없어야 하는) 컨트롤러에서 스티어링 휠을 에뮬레이트하는 소프트웨어나 방법이 있습니까?

관련 정보