for (int i = 0; i < pr.getNumber(); i++) {
pr.getPickData(i).getTargetMesh().setRandomColors();
System.out.println(pr.getPickData(i
).getTargetMesh().getParentGeom().getName());
}
That is bigger part of the code, I tried getParentGeom() but all I get is "temp0" :s
Well that code up there is responsible for changing colour of selected object, I want it to return it's name as soon as I click it, however it returns same value "temp0" for every possible object in scene I click :s
[ ] the spatial named "temp0" is returned every time. you checked it in a debugger. the reason is that you're firing the ray from inside a spatial called "temp0", so it's always the first hit