I got your sample code from the Wiki (
http://www.jpct.net/wiki/index.php/Picking):
-- EXTRACT --
SimpleVector dir=Interact2D.reproject2D3D(camera, frameBuffer, x, y);
int[] res=Interact2D.pickPolygon(world.getVisibilityList(), dir);
In res, you'll find the polygon- and the object number (in that order), if the picking actually picked something. If not, res is null. Your picked Object3D is now
(*) Object3D picked=world.getObject(res[1]);
-- EXTRACT --
But that works probably for the Desktop version of JPCT (I didn't tested it).
In JPCT-AE, doing the same, will just give a null pointer executing the marked (*) line of code
While casting to Object3D return the right value:
Object3D picked=(Object3D)result[1];
I was writing just to be sure it was the correct way in JPCT-AE.
Thanks,
Ulrick