First implementation of picking is up!

This version is only accurate to bounding spheres. Not accurate to triangles quite yet. That is next.

I’ll get this version into CVS soon.

After playing with it, there are going to be two versions of picking. Geometry picking (hitting stuff in the scene) that’s up now. The second version will be GUI picking, it will use the components coordinates and size to determine hit results rather than a bounding volume.

Ok, it’s in CVS still a bit rough. Check out com.jme.test.intersection.TestPick for a test. You see the familiar jme box. Pressing the left mouse buttons “shoots”. If you hit the box, you get a point. :slight_smile: The shot line is added to the scene graph so you can see the actual pick line used.

Play with it, let me know what you think.

One question for you guys…

How important is triangle picking accuracy for you at the moment? Current version is bounding volume accurate. I ask because the calculation for the triangle is a biggy. It will continue to be on the list of things to do, but pushed back a bit.

If there is a big enough demand for triangle accurate picking I’ll get it in now, otherwise it will be later.

I’m going to assume boundingsphere accuracy is fine for the time being, and close this issue. I’ll make triangle accuracy a priority of the enhancement phase. Picking is now considered complete.

For me boundingsphere is great :slight_smile: . Bounding boxes would be good if its not too much work but not much use for triangle picking at this stage.


BoundingBoxes are a definate possibility. Not very difficult to implement them either. I was planning on doing it later, but if you’d prefer it sooner. Let me know how important they are to you and I can get them in quicker.

This week, I hope to finish collision detection. Which will use the bounding sphere’s extensively, so also think if you’d like bounding boxes for that as well.

Bounding boxes would be nice. :slight_smile:

This week, I hope to finish collision detection. Which will use the bounding sphere's extensively, so also think if you'd like bounding boxes for that as well.

Collision detection gets my vote as the first priority. I would love to see bounding boxes with collision detection if you can accomodate it (I have been waiting to use it in my project).

Ok, I’ll start with Collision Detection, get that working and then add bounding boxes.