Jump to content

Gesture Wheel controller support help


Recommended Posts

So I had Gesture Wheel working on controllers back before the scoreboard got mapped to right stick click-- back then it worked by holding right stick click, then selecting with left stick. When the scoreboard got mapped to that, the Gesture Wheel key got bumped to left stick click. I'm not sure if it worked at that point (nobody said anything until recently).

 

Unfortunately it seems to have broken since then and I can't seem to fix it. I don't have a controller to test it with, so that makes it really hard.

 

Players with controllers say that it lets you bring up the wheel with left stick click, but that nothing I've tried lets them select emotes. Initially it was still reading left stick tilt, like playercontroller does:

		local xdir = TheInput:GetAnalogControlValue(CONTROL_MOVE_RIGHT) - TheInput:GetAnalogControlValue(CONTROL_MOVE_LEFT)		local ydir = TheInput:GetAnalogControlValue(CONTROL_MOVE_UP) - TheInput:GetAnalogControlValue(CONTROL_MOVE_DOWN)

I tried changing this to read the right stick, but that doesn't seem to be working either:

		local xdir = TheInput:GetAnalogControlValue(CONTROL_INVENTORY_RIGHT) - TheInput:GetAnalogControlValue(CONTROL_INVENTORY_LEFT)		local ydir = TheInput:GetAnalogControlValue(CONTROL_INVENTORY_UP) - TheInput:GetAnalogControlValue(CONTROL_INVENTORY_DOWN)

If anyone with a controller wants to take a look and see if they can get it working, I'm sure you'd make a bunch of players happy!

 

You'll probably want to look mainly in scripts/widgets/gesturewheel.lua, the controller part of OnUpdate, although I suspect that the HUD input focus stuff in the modmain may also be relevant. I've commented out an older way of doing it that you can try.

 

The latest version is on the Workshop.

Link to comment
Share on other sites

Thanks PrzemoLSZ for figuring it out-- it turned out that it was the support for party dance that broke it, because when party dance wasn't active, the stored radius of the wheel was getting set to zero (and it multiplied the controller tilt by the radius).

 

So for future reference, those two snippets of code are how you read the left and right stick tilts, respectively.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...