Triangle Pick Results

Is there an equivalent to jme2 TrianglePickResults in jme3?

I did some poking around on the forums and found a couple of code examples and the HelloPicking example but didn't see anything.

The current picking kinda works but seems to give odd results. I'll get nulls when retrieving the geometry of a collision it and seems to be based on bounding boxes.

Anyway was just wondering.



Did some more testing on this. I'm also attaching an example scene file. This might also be another ogreMax issue. I couldn't get any null collision results but you can see the issue I was having and my confusion on how picking was being done.

Swapping out the data used for the HelloPicking test with the example with:

 assetManager.registerLocator("picking_test", FileLocator.class.getName());
    shootables = (Node)assetManager.loadModel("picking_test.scene");

For any picking on the "floor" box the red ball marker's position is correct. For all other objects it's not. It will appear in seemingly random spots - even empty space.

If you rescale the node at all like with


The red ball marker doesn't seem to work with anything. Not even the floor.

The data for the collisions themselves seems to be okay. At least for what's being hit in front of what. Just thought I should post the collision point and scaling issue for future things (like adding bullet holes or something. It's not anything I need specifically myself.)

If I can do a test with the null collision results will post something.

If you having any questions or want another test scene just let me know.


Maybe its because you're using getContactPoint() instead of getWorldContactPoint()?

There was a small issue with getWorldContactPoint(), which I fixed just now in SVN.

I tried your scene with it, scaled or not scaled, it works perfectly now.

Yep it all looks good. Didn't know about the getWorldContactPoint().

Many thanks again,