Created
December 9, 2023 10:00
-
-
Save flushpot1125/cfea6d6e3e789579319debc846035629 to your computer and use it in GitHub Desktop.
This file contains 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
// wrap in bounding box mesh to avoid picking perf hit | |
var gltfMesh = container.meshes[0] | |
var boundingBox = BABYLON.BoundingBoxGizmo.MakeNotPickableAndWrapInBoundingBox(gltfMesh) | |
// Create bounding box gizmo | |
var utilLayer = new BABYLON.UtilityLayerRenderer(scene) | |
utilLayer.utilityLayerScene.autoClearDepthAndStencil = false; | |
var gizmo = new BABYLON.BoundingBoxGizmo(BABYLON.Color3.FromHexString("#0984e3"), utilLayer) | |
gizmo.attachedMesh = boundingBox; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment