Electronicks / JoyShockMapper

A tool for PC gamers to play games with DualShock 4s, JoyCons, and Pro Controllers. Gyro aiming, flick stick.
Other
343 stars 20 forks source link

Can't use GYRO_SENS with MOTION_STICK_MODE = RIGHT_STICK #33

Closed lyahdav closed 3 years ago

lyahdav commented 3 years ago

I have the following config:

VIRTUAL_CONTROLLER = XBOX

UP = X_UP
DOWN = X_DOWN
LEFT = X_LEFT
RIGHT = X_RIGHT
L = X_LB
R = X_RB
W = X_X
S = X_A
N = X_Y
E = X_B
L3 = X_LS
R3 = X_RS
- = X_BACK
+ = X_START
HOME = X_GUIDE
ZL_MODE = X_LT
ZR_MODE = X_RT
LEFT_STICK_MODE = LEFT_STICK
RIGHT_STICK_MODE = RIGHT_STICK
MOTION_STICK_MODE = RIGHT_STICK

If I then try to input GYRO_SENS = 2 it resets the gyro to control the mouse. Is there another way to set gyro sensitivity with this config?

BraqueDown commented 3 years ago

I guess JSM assumes that GYRO_SENS would be defined in the config directly after calibration and before everything else. Actually, Gyro Mouse and Motion Stick are independent features that can be active at the same time. If you add GYRO_SENS and leave MOTION_STICK_MODE = NO_MOUSE, you can see in the JSM window that the directional bindings still fire while gyro mouse is active.

Motion Stick doesn't actually use GYRO_SENS at all.

From the README:

  • MOTION_DEADZONE_INNER (default 15°) - How far the controller needs to be tilted in order to register as non-zero.
  • MOTION_DEADZONE_OUTER (default 135°) - How far from the maximum rotation will be considered a full tilt. The maximum rotation is of course 180°, so the default value of 135° means tilting at or above 45° from the neutral position will be considered "full tilt".
lyahdav commented 3 years ago

So then how can I control the gyro sensitivity without affecting the right stick sensitivity since I have both mapped to virtual controller’s right stick?

lyahdav commented 3 years ago

Oh wait, I think you’re saying to use MOTION_DEADZONE_OUTER?

BraqueDown commented 3 years ago

Yeah, I think that'll do it. Just know that Motion Stick will still do turning over time, and not relative movement like Steam Input's Mouse Joystick.

lyahdav commented 3 years ago

I just realized that I want relative movement when using motion stick, since that’s what I’m used to from Steam and feels more natural for FPS games. I’m assuming JSM doesn’t support it now but is this even feasible to build into JSM? It seems to me you’d have to translate changes in the gyro angle into different amounts of movement of the stick, probably based on certain parameters to tweak it. I’d be willing to try coding this if anyone can give me some pointers of where I should look in the codebase.

lyahdav commented 3 years ago

Actually I just found that https://www.rewasd.com/ in gyro mode does exactly this. I’m just going to use that for now.

Electronicks commented 3 years ago

The motion stick uses the stick settings, not the gyro settings. The confusion is understandable, but as pointed earlier, the motion stick operates independantly from driving the mouse with the gyro.

Electronicks commented 3 years ago

I'm closing this issue as it stems from a misunderstanding of the settings.