Skip to content

Conversation

Zishan-Rahman
Copy link
Contributor

I've opened this as a draft PR because there's just one small (read: big) problem: Focusing on the root mesh this way doesn’t show its bounding box, even though it’s meant to have one. Even through the editor, I can manually toggle the root mesh’s bounding box, but it still doesn’t show, and I don’t yet know why:
Screenshot 2025-09-08 at 15-42-06 Flock XR - Creative coding in 3D

A clearer view of the inspector from the above scenario (even with the root mesh’s bounding box view turned on):
inspector

@tracygardner
Copy link
Contributor

@Zishan-Rahman The parent mesh isn't visible. You don't want it to be but it needs to be to show the bounding box. Try

pickedMesh.visibility = 0.001;

But check whether it has any unwanted effects. You may need to make it invisible when not selected.

TODO:
- Unset it when mesh is deselected
- FIgure out why it somehow still isn't working yet
@tracygardner
Copy link
Contributor

@Zishan-Rahman Looks like you're selecting an intermediate node, you need the top-level parent that has geometry.

boundingbox

…bounding box properly

TODO: Figure out how to reset parent mesh visibility upon deselection of composite mesh
@Zishan-Rahman
Copy link
Contributor Author

Zishan-Rahman commented Sep 15, 2025

I still need to figure out how to reset the parent mesh's visibility upon deselecting said mesh, and I also still need to look for any unwanted consequences of this change.

@Zishan-Rahman
Copy link
Contributor Author

Zishan-Rahman commented Sep 15, 2025

@tracygardner I have a question: At present, are there any event handlers in FlockXR for what happens after a gizmo's action is enacted? Because, to the best of my knowledge, you click on the select gizmo, use it to select a mesh, and it's done. The bounding box only disappears when you click elsewhere within the canvas; even when you click on another mesh, the select gizmo's not active anymore so that mesh isn't selected. Is there any code to handle that? I tried writing some code to reset the parent mesh's visibility in the case where no mesh is picked (as defined in line 668 of the current ui/blockmesh.js in main and line 678 676 of the same file in this PR), but it seems that code isn't being reached as, when I try to print out the mesh's visibility, nothing appears in the console. How is the "aftermath" of this gizmo's use handled by existing FlockXR code, if the codebase is used to handle that at all? I'd appreciate your advice on this because I'm finding it rather difficult to be able to reset the visibility of the mesh within the select gizmo code itself, at least without causing one or more unintended consequences.

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.

2 participants