Picking BezierCurves

I've been having difficulty with getting results from using mouse-picking (via findPick() ) to work with BezierCurves.

The strange thing is that all other scene objects that I've tried seem to work fine; spheres and even lines work no problem. I'm starting to wonder if there's something fishy about an overwriten findPick. My code is essentially:

rootNode.findPick(mouseRay, results);

yet results never seems to contain a curve, despite it working on every other object. Thoughts? Can someone verify that findPick works with curves in their program?

BezierCurves are an oddity from way back in the day and are not well supported.  picks and collision are just small empty "TODO" comments right now, which is why you are seeing what you are seeing.  Seems like someone could redo those to use Line instead of Geometry…


this might be coming a bit late but you can perhaps override the findpick method in Bezier and do the following

iterate a loop with float time from 0 to 1 in steps of 0.01 etc… (100 steps)

get a distance d = ray.distance(getPoint(t))

if the distance is small enough then add this curve to the pickresults

the idea is simple, you divide the curve into small segments with a ref point… and check if any of these ref points are close enough to the ray…

i had tried it once and it works

hope it helps