# VTK: how to set the threshold for vtkPropPicker

**URL:** https://discourse.vtk.org/t/vtk-how-to-set-the-threshold-for-vtkproppicker/4833
**Category:** Support
**Created:** [December 16, 2020, 1:59pm UTC](https://discourse.vtk.org/t/vtk-how-to-set-the-threshold-for-vtkproppicker/4833 "2020-12-16T13:59:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![zhang-qiang-github](https://discourse.vtk.org/user_avatar/discourse.vtk.org/zhang-qiang-github/32/2519_2.png) [@zhang-qiang-github](https://discourse.vtk.org/u/zhang-qiang-github)
#### Post date: [December 16, 2020, 1:59pm UTC](https://discourse.vtk.org/t/vtk-how-to-set-the-threshold-for-vtkproppicker/4833/1 "2020-12-16T13:59:11Z")

</div>

When click the mouse, vtkPropPicker can decide whether a actor is selected. I wonder whether can we set a threshold to decide whether the actor is selected?

For example, if the distance between the mouse click position and actor is less than `threshold`, the actor is selected. If the distance is larger than `threshold`, the actor is not selected. Can we set such a `threshold`?

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [December 16, 2020, 3:04pm UTC](https://discourse.vtk.org/t/vtk-how-to-set-the-threshold-for-vtkproppicker/4833/2 "2020-12-16T15:04:59Z")

</div>

I’m not sure there is a built-in mechanism to specify tolerance to pickers. Have a look at the hardware picking code and see where you could introduce this tolerance, for example by rendering actors slightly larger when the selector renders them. If you want to use this for picking widgets that’s a different mechanism - in that case you need to dig into widgets picking code (which I think can pick in a specified radius).

---

<div class="post-metadata">

### Author: ![zhang-qiang-github](https://discourse.vtk.org/user_avatar/discourse.vtk.org/zhang-qiang-github/32/2519_2.png) [@zhang-qiang-github](https://discourse.vtk.org/u/zhang-qiang-github)
#### Post date: [December 23, 2020, 12:31am UTC](https://discourse.vtk.org/t/vtk-how-to-set-the-threshold-for-vtkproppicker/4833/3 "2020-12-23T00:31:54Z")

</div>

@lassoan， I find the `vtkCellPicker` has the set tolerance method. But, the world point from `vtkCellPicker` and `vtkPropPicker` is not equal. And there is more [details](https://discourse.vtk.org/t/vtk-provide-three-different-world-point-converted-from-three-methods-with-one-display-point/4843). Is there any thing wrong with my code?

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [December 23, 2020, 2:38am UTC](https://discourse.vtk.org/t/vtk-how-to-set-the-threshold-for-vtkproppicker/4833/4 "2020-12-23T02:38:17Z")

</div>

I’ve answered your question at the topic you referred to above.
