I have a large scene (749 nodes with each 2 spheres) generated from a JSON file, and I want to be able to do normal picking. but for some reason jME doesn’t want to. I can snipe a geometry at position 7.2, 7.0, 14.0 from up to 751 units away, but if I want a click on a geometry at position 28.5,28.6,0.3, I have to be within approximately 25 units.
I have absolutely no idea why this happens, so I did some searching on the forum. No one seemed to have reported this problem (or I have not searched long enough).
I’m also not sure what code could be responsible. For picking I basically copy-pasted the tutorial. If you need a certain bit of code, just ask for it.
Do you have any idea what could be causing this problem?
I already did some debugging. Forgot to mention it.
For each of those 749 nodes, I have a repr#id and a coll#id. The repr is the representation of the object, while the coll is invisible (cullmode: both) and is larger.
This is what happens:
I click my mouse button
The input is registered
I collide with a ray
The collision results are printed
The collision results are either a bunch of collisions with colls and reprs or empty.
That doesn’t make any sense to me. First of all, I can hit something from 751 wu away. Secondly, why would a ray have a length? Isn’t the whole point of having a ray to have a line that goes infinitely really, really far?
No, I do not have any invisible geometries (apart from the colls, which I’m trying to hit).
Well, no… it just made a direction that wasn’t really a direction and definitely not the direction you wanted. You needed an apple but instead you took an elephant and shrunk it down to fruit size. Results will certainly be confusing then.