Using jMonkey in applications

I found that

picker.wasObjectPicked()

returns false becose

display.getPickRay(screenPos, useCanvas, ray);

(in MousePicker class in runPicker method)

cause an exception "java.lang.ArithmeticException: This matrix cannot be inverted"

The exception is cathced and method returns false.








Try calling camera.apply() after adjusting the frustum.

No difference… still the same problem…

That's, really odd.  Are you sending in your PickRay or just letting the renderer figure it out for you?





And are you doing anything with the canvas when your frustum changes?