Picking greased line only works in the middle

Hi,

I’m trying to create a greased line with a specific width and then make it pickable when I click on it. I have the problem that only the middle of the line is pickable, when moving the cursor closer to the edge it is not pickable anymore.

Is it possible to make the line pickable everywhere?
Thanks for your help!

cc @roland, the master mind behind greased lines!

3 Likes

Hi!

Sorry for the late response.

Have a look at this topic:

https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param/greased_line#picking-and-intersections

If you need more info don’t hesitate to ask.

2 Likes

Thank you for the reply!

Setting the intersectionTreshold property to 1 solved it for me.
I have updated the playground a little bit if anyone else is looking for the solution.

3 Likes