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

WebXRManager: Get linear/angular velocity for targetRay and grip poses if available. #21524

Merged
merged 8 commits into from
Apr 22, 2021

Conversation

davehill00
Copy link
Contributor

Description
The WebXR spec has been updated allowing the User Agent to pass along linear and angular velocity values for the controller poses. Read this if it's available and pass attach to the _targetRay and _grip structures.

See https://immersive-web.github.io/webxr/#xrpose-interface for more info.

…able

WebXR spec has been updated allowing the User Agent to pass along linear and angular velocity values for the controller poses. Read this if it's available and pass attach to the _targetRay and _grip structures.

See https://immersive-web.github.io/webxr/#xrpose-interface for more info.
@davehill00 davehill00 closed this Mar 26, 2021
@mrdoob
Copy link
Owner

mrdoob commented Mar 26, 2021

@davehill00 Why was this closed? 🤔

@davehill00
Copy link
Contributor Author

davehill00 commented Mar 26, 2021 via email

@davehill00 davehill00 reopened this Mar 27, 2021
@mrdoob mrdoob added this to the r128 milestone Mar 30, 2021
@Mugen87 Mugen87 changed the title Get linear/angular velocity for targetRay and grip poses if available WebXRManager: Get linear/angular velocity for targetRay and grip poses if available. Apr 22, 2021
Clean up code style.
@mrdoob
Copy link
Owner

mrdoob commented Apr 22, 2021

@davehill00 are the booleans there because linearVelocity and angularVelocity are not guaranteed to be available in all frames?

@davehill00
Copy link
Contributor Author

@davehill00 are the booleans there because linearVelocity and angularVelocity are not guaranteed to be available in all frames?

I wasn't sure of a better way to handle the case where this is running on a browser that doesn't support these values. The WebXR spec treats these as optional values that not every implementation needs to implement. But in theory, it's also true (and spec compliant) that a browser might not have these these values available in all frames.

@mrdoob
Copy link
Owner

mrdoob commented Apr 22, 2021

But in theory, it's also true (and spec compliant) that a browser might not have these these values available in all frames.

Okay 👍

@mrdoob mrdoob merged commit fd3d28e into mrdoob:dev Apr 22, 2021
@mrdoob
Copy link
Owner

mrdoob commented Apr 22, 2021

Thanks!

@mrdoob
Copy link
Owner

mrdoob commented Apr 22, 2021

Hmm, I guess we'll have to do loose checks... b82d7bd

The linearVelocity and angularVelocity properties are (understandably) undefined in WebXR Emulator.

/fyi @takahirox

@takahirox
Copy link
Collaborator

I already opened MozillaReality/WebXR-emulator-extension#274

Maybe I would set them to null so far to follow the spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants