Hot Door CORE Forum

Full Version: HitData has trouble recognizing in/out control points
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It seems there's something strange regarding tools recognizing control points with either HitData or cursorHitData. I have better luck when the hit request asks only for control points (in and out) or when the tolerance is increased to 4 or more. A cursor is more likely to recognize a control point at 100% or smaller, while zoomed in to, say, 400% it usually can't detect a control point. When it does, it senses the control point several pixels below the actual control point. Recognizing anchor points and segment interiors works flawlessly. Is there a trick to get more reliable results?
After refusing to give up on this, I discovered that the control points HitData can find are the ones lying inside of the stroke bounds. Those between the control bounds and stroke bounds aren't recognized. I hope this helps make a fix a little easier.
As it stands now, CORE cannot be used to create a plugin for a tool that adjusts segment control handles until it's updated to recognize control points outside of the path bounds. Is this something that is likely to be addressed soon, or would you recommend I use SDK hit functions instead? The SDK route is not an attractive alternative for many reasons, but a plugin I now have in development needs reliable control point hit detection.
Thanks for pointing this out. We never had a reason for this and after talking with Garrett about it, I think it will need much more time than we have at the moment. It's now on the list for a future version, but you should use the SDK for now.
Thanks, Brendon. As a workaround, I added a function that does a HitTest for control points only using both CORE and SDK methods, then returns CORE HitData. If the SDK found a control point that CORE didn't, it returns HitData with the corresponding segPoint hit, and sets variables for the actual hit type and location. I'd rather return a correctly-structured CORE HitData, but this works well enough for now.