Skip to content

Conversation

@vincentfretin
Copy link
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
Copy link
Contributor

mrxz commented Nov 25, 2024

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.

@vincentfretin
Copy link
Contributor Author

Got it, I did the change you suggested.

@vincentfretin
Copy link
Contributor Author

@dmarcos ready to be merged

@dmarcos
Copy link
Member

dmarcos commented Nov 25, 2024

Thanks!

@dmarcos dmarcos merged commit 1047eac into aframevr:master Nov 25, 2024
3 checks passed
@vincentfretin vincentfretin deleted the fix-cursor-inspector branch November 26, 2024 08:31
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