From 8c40bae444fbf2f93077656c8232a61aa785237a Mon Sep 17 00:00:00 2001 From: minenice55 Date: Mon, 25 Jul 2022 18:56:13 -0400 Subject: [PATCH] update joyshock gyro and touch states --- .../Scripts/InputSystem/ControllerTypes/InputJoyshock.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Assets/Scripts/InputSystem/ControllerTypes/InputJoyshock.cs b/Assets/Scripts/InputSystem/ControllerTypes/InputJoyshock.cs index f1924b56..09380350 100644 --- a/Assets/Scripts/InputSystem/ControllerTypes/InputJoyshock.cs +++ b/Assets/Scripts/InputSystem/ControllerTypes/InputJoyshock.cs @@ -120,6 +120,14 @@ namespace HeavenStudio.InputSystem joyBtStateLast = joyBtStateCurrent; joyBtStateCurrent = JslGetSimpleState(joyshockHandle); + //gyro and accelerometer + joyImuStateLast = joyImuStateCurrent; + joyImuStateCurrent = JslGetIMUState(joyshockHandle); + + //touchpad + joyTouchStateLast = joyTouchStateCurrent; + joyTouchStateCurrent = JslGetTouchState(joyshockHandle); + //stick direction state //split controllers will need to be rotated to compensate //left rotates counterclockwise, right rotates clockwise, all by 90 degrees