Model picking some times not work :-(

for one models pick work FINE!

but for other model it's find nothing :frowning:



all models was converting from DirectX format (.x)  to 3ds



any help? maybe not model manipulate, maybe diferent pick way?



first:
            MaxToJme conv = new MaxToJme();
            ByteArrayOutputStream BO = new ByteArrayOutputStream();
            TextureKey.setOverridingLocation(new URL("file:textures\"));
            FileInputStream fis = new FileInputStream("resource\some.3ds");
            conv.convert(fis, BO);
            BinaryImporter jbr = new BinaryImporter();
            result = (Node) jbr.load(new ByteArrayInputStream(BO.toByteArray()));
            result.setModelBound(new BoundingBox());

            result.setLocalScale(0.5f);
            result.setName(path);
            result.updateWorldBound();
            result.updateModelBound();
            result.updateRenderState();
            back.attachChild(result);

then:
        Vector2f screenPos = new Vector2f();
        screenPos.set(MouseInput.get().getXAbsolute(), MouseInput.get().getYAbsolute());
        Vector3f worldCoords = World.getInstance().getDsp().getDisplay().getWorldCoordinates(screenPos, 0);
        PickResults pr = new BoundingPickResults();
        Ray mouseRay = new Ray(World.getInstance().getDsp().getCamera().getLocation(),
                worldCoords.subtractLocal(World.getInstance().getDsp().getCamera().getLocation()));
        pr.clear();
        back.findPick(mouseRay, pr);

Try to use System.out.println("…") to verify if its not the same place, like here:


Ray mouseRay = new Ray(World.getInstance().getDsp().getCamera().getLocation(), <


                worldCoords.subtractLocal(World.getInstance().getDsp().getCamera().getLocation())); <



another thing:
try using

conv.setProperty("bound","box");



;)  ;)

don't work

it's strange 1 model loaded picking well, but another not picking. Why? 

maybe diferent file format? Mesh? but if it's different why it's look well on screen?

:? not understand

i'm solve problem, but not right way.

i'm add box arround model ad do it invisible

box picking fine and i'm get model id