# LinesMesh - Picking - Picked point is returned as null

**URL:** <https://forum.babylonjs.com/t/linesmesh-picking-picked-point-is-returned-as-null/27324>\
**Category:** Questions\
**Tags:** material\
**Created:** [February 2, 2022, 7:20pm UTC](https://forum.babylonjs.com/t/linesmesh-picking-picked-point-is-returned-as-null/27324 "2022-02-02T19:20:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![anand471](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/anand471/32/20479_2.png) [@anand471](https://forum.babylonjs.com/u/anand471)\
**Post date:** [February 2, 2022, 7:20pm UTC](https://forum.babylonjs.com/t/linesmesh-picking-picked-point-is-returned-as-null/27324/1 "2022-02-02T19:20:23Z")

</div>

In our application, we use LinesMesh. On picking of line, PickingInfo.pickedPoint is returning null since 5.0.0.alpha.64. It used to return position value until 5.0.0.alpha.63

In the console output of sample app [here](https://github.com/anand471/babylonjs-typescript-edgepick), PickingInfo.pickedPoint is returned as null. Also, the faceId returned is -1  
In the above app, if I use 5.0.0.alpha.63, pickedPoint is returning values.

Is there any new / additional property that needs to be set for getting pickedPoint (from alpha 64) for line mesh picking? or Am I missing anything?!

Strangely, Identical code in the playground sample [here](https://playground.babylonjs.com/#T1EA8R#8) is returning values for PickingInfo.pickedPoint.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [February 2, 2022, 7:29pm UTC](https://forum.babylonjs.com/t/linesmesh-picking-picked-point-is-returned-as-null/27324/2 "2022-02-02T19:29:23Z")

</div>

cc @sebavan who worked on it recently

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [February 2, 2022, 7:29pm UTC](https://forum.babylonjs.com/t/linesmesh-picking-picked-point-is-returned-as-null/27324/3 "2022-02-02T19:29:45Z")

</div>

Cab you try with the latest beta (beta 5?)

---

<div class="post-metadata">

**Author:** ![anand471](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/anand471/32/20479_2.png) [@anand471](https://forum.babylonjs.com/u/anand471)\
**Post date:** [February 2, 2022, 7:32pm UTC](https://forum.babylonjs.com/t/linesmesh-picking-picked-point-is-returned-as-null/27324/4 "2022-02-02T19:32:43Z")

</div>

I see the same problem in 5.0.0-beta.5 also. The sample app that’s shared uses beta 5 only.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [February 2, 2022, 8:26pm UTC](https://forum.babylonjs.com/t/linesmesh-picking-picked-point-is-returned-as-null/27324/5 "2022-02-02T20:26:28Z")

</div>

It has been fixed right after the beta.5 [Babylon.js Playground](https://playground.babylonjs.com/#M4UJ83) it will be in the next one

---

<div class="post-metadata">

**Author:** ![anand471](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/anand471/32/20479_2.png) [@anand471](https://forum.babylonjs.com/u/anand471)\
**Post date:** [February 2, 2022, 9:12pm UTC](https://forum.babylonjs.com/t/linesmesh-picking-picked-point-is-returned-as-null/27324/6 "2022-02-02T21:12:22Z")

</div>

Thanks. I’ll check it when next version is updated to npm.

Further, I just noticed in the Playground sample you have shared [above](https://playground.babylonjs.com/#M4UJ83), Scene.pick is picking a mesh that’s made not pickable (`isPickable= false`).  
Whereas Scene.multiPick is picking the mesh as intended.  
In console, Mesh id is printed. For both Scene.pick & Scene.multiPick ids should have been the same.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [February 2, 2022, 9:37pm UTC](https://forum.babylonjs.com/t/linesmesh-picking-picked-point-is-returned-as-null/27324/7 "2022-02-02T21:37:36Z")

</div>

Actually what happens here is you are using a custom predicate `scene.pointerMovePredicate = () => { return true; }` bypassing checks for enable/disable picking and such so you always test all of them.

Then in the result of this one, you are calling multipick without predicate so the default applies and returns only the pickable one.

PointerMove does not pick except if explicitely required by action manager, or enablePointerMoveEvents, or scene.constantlyUpdateMeshUnderPointer

---

<div class="post-metadata">

**Author:** ![anand471](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/anand471/32/20479_2.png) [@anand471](https://forum.babylonjs.com/u/anand471)\
**Post date:** [February 3, 2022, 3:25pm UTC](https://forum.babylonjs.com/t/linesmesh-picking-picked-point-is-returned-as-null/27324/8 "2022-02-03T15:25:58Z")

</div>

ok. So now I understand, Playground works with Nightly builds. Hope I’m right.

I got confused as the playground currently shows version as 5.0.0-beta.5 and I expected it could be matching with the build last released in NPM. Seems it’s not.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [February 3, 2022, 6:57pm UTC](https://forum.babylonjs.com/t/linesmesh-picking-picked-point-is-returned-as-null/27324/9 "2022-02-03T18:57:31Z")

</div>

Yup playground is on nightly builds 🙂 the version will be updated on the next npm push
