Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a grip threshold on our pickup function.
On controllers such as the Oculus touch our grip button is an actual button which results in our logic working pretty sweet.
On controllers such as the Index it's actually a pressure sensor. The problem is that the build in threshold makes it really hard to let go of things.
So here we are implementing our own so we have control over this threshold and use the grip axis as our input.
For controllers such as Oculus Touch controllers OpenXR already provides support so unpressed is
0.0
and pressed is1.0
and switching from the grip button to the grip axis should be transparent.Instead of having this as a property I'm introducing this as a project setting so we can share the same value on other scripts as well.
It's worth contemplating doing this for other shared settings as well.
I have also moved our
Buttons
enum to our plugin script, only the pickup function uses this but we can do further cleanup of other scripts so we don't re-define this everywhere