-
Notifications
You must be signed in to change notification settings - Fork 154
Improve fallback logic in PinchInputReader.cs #1041
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
base: feature/XRI3
Are you sure you want to change the base?
Improve fallback logic in PinchInputReader.cs #1041
Conversation
| } | ||
|
|
||
| value = m_fallbackState.value; | ||
| return value > 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @whebertML, wanted to make sure this doesn't affect the intent of #852
| } | ||
| else if (!m_isSelectValuePolyfilled && !m_isTrackingStatePolyfilled) | ||
| { | ||
| bool isPinched = ReadValue() >= (m_fallbackState.isPerformed ? 0.9f : 1.0f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, maybe we make these constants instead of hardcoding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, would be nicer as it could be clearer where they've come from / what their intent is.
e43defb to
44c1f48
Compare
Hand joints are likely better than a 0 or 1 conversion
44c1f48 to
d70cfff
Compare
hasPinchDatato compare against the value instead, to better represent the Unity methodIsInProgress()when going through the fallback path.khr/simple_controller, that doesn't have both a bool and float action for select.