-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Invalid coords for TryGetPosition and TryGetRotation #1290
Comments
I think there's a simpler way to check if the value is valid at all, including infinity |
TryParse by converting the value ToSting() would cover the infinity, but this can be very expensive in an Update. @StephenHodgson Do you think that Infinity would be invalid in this case with the Motion Controller? |
Why wouldn't |
Why do we need to check |
Who know's. We're getting NaNs so there is the possibility |
The IsInfinity check can be included in the return expression. Would you consider Infinity an invalid value to set a Position or Rotation?? |
@hridpath were you going to submit a PR for this? |
Looks like GitHub didn't automatically close these issues when merged into master. I'll close these manually and look into why. |
In the Unity.XR.WSA.Input.InteractionSourcePose the TryGet functions can return a true value with corrdinates in the results having a NaN value. I have created a Bug Report to Unity and waiting on the results. This may be intentional on their part so inorder to prevent errors when using the output of these methods, A NaN check should be done prior to using the values.
As a Temporary fix the following code can be used allong with these TryGet functions.
Here is a snippit of code to fix this in teh MotionControllerVisualizer.cs
The text was updated successfully, but these errors were encountered: