# BABYLON.ActionManager.OnPickTrigger do not work when I use custom mesh

**URL:** <https://forum.babylonjs.com/t/babylon-actionmanager-onpicktrigger-do-not-work-when-i-use-custom-mesh/28379>\
**Category:** Questions\
**Created:** [March 12, 2022, 1:25pm UTC](https://forum.babylonjs.com/t/babylon-actionmanager-onpicktrigger-do-not-work-when-i-use-custom-mesh/28379 "2022-03-12T13:25:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shibi](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/shibi/32/19002_2.png) [@shibi](https://forum.babylonjs.com/u/shibi)\
**Post date:** [March 12, 2022, 1:25pm UTC](https://forum.babylonjs.com/t/babylon-actionmanager-onpicktrigger-do-not-work-when-i-use-custom-mesh/28379/1 "2022-03-12T13:25:45Z")

</div>

I use a .gltf mesh and load it with sceneloader.  
I loaded it and add a BABYLON.ActionManager.OnPickTrigger to it. when I add it to a box, it works, but when I add it to my custom mesh, it do not work. why？  
code here:

```auto
const importPromise = BABYLON.SceneLoader.ImportMeshAsync("", "./assets/models/", "scene.gltf");

    importPromise.then((result) => {

        var mesh = result.meshes[0];

        mesh.actionManager = new BABYLON.ActionManager(scene);

        mesh.actionManager.registerAction(

            new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickTrigger,

                function (evt) {

            const sourceMesh = evt.meshUnderPointer;

            sourceMesh.scaling = new BABYLON.Vector3(2, 2, 2);

                }));

            });

```

---

<div class="post-metadata">

**Author:** ![Blake](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/blake/32/21509_2.png) [@Blake](https://forum.babylonjs.com/u/Blake)\
**Post date:** [March 12, 2022, 3:51pm UTC](https://forum.babylonjs.com/t/babylon-actionmanager-onpicktrigger-do-not-work-when-i-use-custom-mesh/28379/2 "2022-03-12T15:51:55Z")

</div>

You’re adding the behavior to the [root node](https://doc.babylonjs.com/divingDeeper/importers/glTF#warning) that Babylon adds when loading gltf models. Try adding the behavior to result.meshes[1], which will be the actual mesh that you’re loading.

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [April 11, 2022, 11:22am UTC](https://forum.babylonjs.com/t/babylon-actionmanager-onpicktrigger-do-not-work-when-i-use-custom-mesh/28379/3 "2022-04-11T11:22:47Z")

</div>

Hello @shibi just checking in, was your question answered?
