-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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: Introduce updateCamera() and refactor getCamera(). #21886
Conversation
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 like the change -- just a couple documentation comments!
I like the change too 👍 |
this.getCamera = function ( camera ) { | ||
this.updateCamera = function ( camera ) { | ||
|
||
if ( session === null ) return; |
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.
Thanks!
@elalish I think this should solve your raycasting-in-ar issues. |
Thanks! |
Related issue: Fixed #21002.
Description
Since the new XR hand examples use
getCamera()
on app level, it's important to fix #21002 and avoid unnecessary computations whengetCamera()
is called.Like suggested by @gkjohnson, the PR introduce a new flag
cameraAutoUpdate
and a new update method that allows the app to perform the Kamera update manually. This is important to ensure up-to-date matrices so frame-late effects can be avoided.