Sg2.9
Checking for nearby objects
Recent RSS
Checking for nearby objects
Date:  24. February 2011, 14:46

Say that I draw a path a certain lenght and at the end of the path I want to perform a check to see if there are any anchors or other paths nearby within a given radius. Is that possible with hitTest?
If I understand correctly, the tolerance setting only measures in pixels which would imply that it is resolution dependant (i.e. the more zoomed in, the shorter - in point units - the distance.

Re: Checking for nearby objects
Date:  24. February 2011, 17:00

You can use the zoom of the active view to set it to points:

var hit = path.hitTest(point, 'all', document.activeView.zoom * 8);
Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
rot3d 24.05.09