Picking an object other than closest or getting a list of intersected objects

Hi,

I’d like to be able to find a ray intersection other than the nearest object. I’ve got picking working with pickClosest(), but while dragging this object I want to be able to refer to what the ray intersects on meshes other than the dragged object.

If I can either get a list of intersected objects for the ray, or if I could temporarily disable picking for the object getting dragged, I think I’d have what I need. I’ve tried setActivationState(0) for the rigid body, but that doesn’t seem to be doing it. Any suggestions for how to do either of these things?

It looks like, if there was some additional binding to the bullet library you could use the AllHitsRayResultCallback struct in bullet that would let you get all of the ray intersections, but that isn’t bound to Haxe yet. You could check out this topic if you wanted to try to add the bindings:

1 Like