Skip to content

Issue when moving camera and using accuSnap #1259

Answered by bbastings
FrancoisDuguayG asked this question in Q&A
Discussion options

You must be logged in to vote

I would recommend not enabling AccuSnap for this, what is likely happening is that you have a snap mode of SnapMode.NearestKeypoint and it is evaluating the snap location based on the default keypoint divisor, which is 2.

So for a line you will either get the start point, end point, or mid point depending on which is closest to the location under the cursor. For surfaces/solids, keypoint snap returns a point on the closest edge, etc. The other reason not to use AccuSnap is that it calls into the backend to evaluate the element geometry.

Have a look at Viewport.pickNearestVisibleGeometry or Viewport.pickDepthPoint instead.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pmconne
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants