FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Make cursor component work when camera is not an entity like in the inspector by vincentfretin · Pull Request #5614 · aframevr/aframe · GitHub

Make cursor component work when camera is not an entity like in the inspector - #5614

Merged
dmarcos merged 2 commits into
aframevr:masterfrom
vincentfretin:fix-cursor-inspector
Nov 25, 2024
Merged

Make cursor component work when camera is not an entity like in the inspector#5614
dmarcos merged 2 commits into
aframevr:masterfrom
vincentfretin:fix-cursor-inspector

Conversation

Copy link
Copy Markdown
Contributor

Description:

@mrxz #5606 broke the inspector that uses a threejs camera directly, not an entity.

Changes proposed:

  • Check if camera.el is defined and only transform local to world coordinates if it is defined

mrxz commented Nov 25, 2024

Copy link
Copy Markdown
Contributor

Ah, I didn't account for scene.camera being set directly and not through the camera system, but for the inspector it does make sense.

Instead of the additional check, it might be better to move the assignment of cameraElParent into the rayOrigin === 'xrselect' clause. While the inspector is open there shouldn't be any xrselect events. And the xrselect raycasting only makes sense when the XRPose is translated into world space, so I'd rather see it bail/error out than to fallback to treating reference space as world space, which might not be correct.

Copy link
Copy Markdown
Contributor Author

Got it, I did the change you suggested.

Copy link
Copy Markdown
Contributor Author

@dmarcos ready to be merged

dmarcos commented Nov 25, 2024

Copy link
Copy Markdown
Member

Thanks!

dmarcos merged commit 1047eac into aframevr:master Nov 25, 2024
vincentfretin deleted the fix-cursor-inspector branch November 26, 2024 08:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL