Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #233: add deadzone to direct movement joystick inputs #323

Closed
wants to merge 4 commits into from

Conversation

surreal6
Copy link
Contributor

@surreal6 surreal6 commented Jan 9, 2023

I find #233 tagged as 'good first issue' for newcomers so i made this PR

Not sure if it will be better to put the deadzone values in the project settings as i see in the snap turning logic...

let me know if i can improve this

@Malcolmnixon
Copy link
Collaborator

I think we're going to end up moving most of the movement properties into the project settings soon. It makes more sense to have them there than scattered around numerous scenes and possibly forgetting to update one. Also it puts the settings in a single area which helps the developer manage them all.

@BastiaanOlij BastiaanOlij added the enhancement New feature or request label Jan 12, 2023
@BastiaanOlij
Copy link
Member

Yes, agreed these should become project settings similar to our grip threshold setting.

@BastiaanOlij
Copy link
Member

Discussed in XR meeting, adding deadzones and other thresholds to XR tools seems warrented. There is likelyhood that things will become available in OpenXR itself to set deadzones and threshold in the action map but that is an unknown at this point in time, both timing wise and what that functionality may be.

We do suggest that instead of these being export variables that they become project settings similar to the grip threshold we added not long ago.

@surreal6 would you mind making that change?

@surreal6
Copy link
Contributor Author

Of course 👌 I can make the changes

@surreal6
Copy link
Contributor Author

I'll be out for two weeks, so can't do the update until then , sorry

@surreal6
Copy link
Contributor Author

Hi, here it is. Not sure about the range hint values, let me know what you think.

@BastiaanOlij BastiaanOlij changed the base branch from master to 3.x March 4, 2023 11:46
@Malcolmnixon
Copy link
Collaborator

@BastiaanOlij There are two questions I have with implementing dead-zone...

Mapping of the outputs

image

When applying a dead-zone, do we want to just "remove" any inputs less than the dead-zone, so for example given a dead-zone of 0.2; an input of 0.19 is mapped to 0 (nothing) and an input of 0.21 is mapped to 0.21 resulting in an inability to provide small values. Conversely an alternate approach is to "rescale" the inputs, so again for a dead-zone of 0.2; an input of 0.19 is mapped to 0 (nothing) and an input of 0.21 is mapped to 0.0125 (0.21 - 0.2) / 0.8, so small values are still possible.

Implemented in all providers

If we want this implemented for all providers, should we move the logic into a helper function in xr_tools.gd rather than reimplementing the logic in all providers.

@BastiaanOlij
Copy link
Member

Owh great idea, I would definitely prefer the rescale option.

@surreal6
Copy link
Contributor Author

#468 solved this and can be closed

@surreal6 surreal6 closed this Jul 26, 2023
@surreal6 surreal6 deleted the 233-movement-dead-zone branch October 31, 2023 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants