Hi all, this is my model file structure,It consists of many meshes,
i want to add click events to the entire model .So I can click anywhere in the model.what need i do ?
You can wrap the model in a BoundingBoxGizmo.
BABYLON.BoundingBoxGizmo.MakeNotPickableAndWrapInBoundingBox(model)
Sorry I don’t have a working demo right now.
You have to add the top root as the mesh. In your first screenshot you have the top mesh named root just pass it to the function.
You can check this playground.
https://playground.babylonjs.com/#K7TJIG#90
It’s very clear,thank you !
I want a TransformNode as an overall trigger object
glb outline | Babylon.js Playground (babylonjs.com)
When I use ABYLON.BoundingBoxGizmo.MakeNotPickableAndWrapInBoundingBox , report wrong .
If a TransformNode as an overall trigger object, what should I do?
example: glb outline | Babylon.js Playground (babylonjs.com)
The error you are seeing is because the function MakeNotPickableAndWrapInBoundingBox only accepts mesh obj. You are passing it a TransformNode.
Can you explain a bit more what you are trying to do.
I don’t know a direct way of making a TransformNode pickable using pointer events. But you can check if the mesh clicked is a descendant of a certain Node.
Check this playground: Playground
This can indeed be realized, thank you vary much



