Is it possible to raycast or perform other intersection-tests against geometry that is points or lines? (not triangles or volumes)

I'm looking to create a 3d visualization tool, so the geometry doesn't need actual physics collision, but I need the user to be able to mouse-pick to select various shapes, some of which are just lines or point-sets. But the points and lines can change dynamically.

I know how to do this in straight OpenGL or D3D, but I don't see how to do this in Godot.

Thanks in advance,
Lee

If I'm understanding you correctly:

  • Godot has no top-level support for this. i.e. no built-in way to say "tell me what object is under my mouse" w/o using collision physics.

  • Godot has low-level functions that would allow me to roll-my-own pick testing. I would need to traverse the scene, transforming the pick-ray and until I reach some geometry to apply the ray-vs-geometry test.

This would all be performed on the CPU. That's not ideal for my use case (too slow on complex geometry). I was hoping for something more like this technique:

http://www.opengl-tutorial.org/miscellaneous/clicking-on-objects/picking-with-an-opengl-hack/

I could implement this myself, but it's more fragile if it's not directly built into the engine, b/c every renderable node has to know how to render it's pick-ID into the buffer.

Correct. But the physics engine is fast. Granted, using id buffers would likely be faster for a large number of items, but I imagine you can get into several thousand with the physics functions (provided the collision meshes were not that complex).

This is curious. The Godot editor can pick objects w/o collision volumes, and the Godot editor is "written in Godot". i.e. I can put any 3d object in a scene, and double-click in the Godot editor, and it knows what I clicked. So there must be a way to do this. (But I may have to dig thru the editor source code to find it)

I have not looked into it but you might be able to do something with the physics server directly perhaps.