AB4D Forum

Full Version: MultiPolyLineVisual3D and hit test area
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was wondering if there is a convenient way of increasing the hit test area of a MultiPolyLineVisual3D?  The only solution i can think of is to duplicate the MultiPolyLineVisual3D and make this duplicated line transparent with a bigger LineThickness and use this for handling mouse over/click events and then perform actions on the associated visible line.  I'm using the EventManager3D for event handling. The problem with this is doubles the number of lines I have on screen which adds overhead.
One way to do that is to add thicker and transparent 3D lines (as you have suggested).

But a better way is to convert line's 3D positions into 2D screen positions and then get the closest line from mouse position in 2D space.

A sample on how to do that can be found with the samples that come with Ab3d.PowerToys library - see "3D lines" - "3D line selection" sample.