# Add click event for a specific model

**URL:** https://forum.babylonjs.com/t/add-click-event-for-a-specific-model/42726
**Category:** Questions
**Created:** [July 26, 2023, 10:36am UTC](https://forum.babylonjs.com/t/add-click-event-for-a-specific-model/42726 "2023-07-26T10:36:33Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![NHD\_MA](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nhd_ma/32/33139_2.png) [@NHD\_MA](https://forum.babylonjs.com/u/NHD_MA)
#### Post date: [July 26, 2023, 10:36am UTC](https://forum.babylonjs.com/t/add-click-event-for-a-specific-model/42726/1 "2023-07-26T10:36:33Z")

</div>

Hello guys, So I loaded a model using import mesh async in my scene. I want to add a listener on it so that when I click on it, a function should work. Wherever I click on the model, it should run. How should I do it.?

---

<div class="post-metadata">

### Author: ![Takemura](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/takemura/32/25836_2.png) [@Takemura](https://forum.babylonjs.com/u/Takemura)
#### Post date: [July 26, 2023, 11:09am UTC](https://forum.babylonjs.com/t/add-click-event-for-a-specific-model/42726/2 "2023-07-26T11:09:15Z")

</div>

I would recommend reading through this post, where ways for general and certain mesh picking are shown:

> [@Listening to click events on mesh](https://forum.babylonjs.com/t/listening-to-click-events-on-mesh/42068/2):
>
> One way is to create an ActionManager for your mesh and register i.e. ExecuteCodeAction with OnPickTrigger: Another solution would be to create onPointerObservable for your scene: scene.onPointerDown = () =\> { if(...) // scene.meshUnderPointer is equal to your mesh { // your code } } You could also use onPointerUp or onPointerObservable with PointerEventTypes.POINTERDOWN or -UP tag. meshUnderPointer-property of Scene: How to use Observables: Edit: To enable/disable c…

Depending on your needs you might also want to read Mesh Picking Docs, where you can utilize predicate:

> **[Mesh Picking | Babylon.js Documentation](https://doc.babylonjs.com/features/featuresDeepDive/mesh/interactions/picking_collisions)**
>
> Learn how to pick meshes in Babylon.js.
