How to add click events to the entire model

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)

Docs

1 Like

sorry i don’t quite follow .do you have demo? this function looks like only works on one mesh.This is how I solved it:

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.

1 Like

You can check this playground.
https://playground.babylonjs.com/#K7TJIG#90

3 Likes

It’s very clear,thank you !