Hi,
I want to do the same like you, but I can get it working.
I use the demo and set the "plane" -> plane.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
then (with the x and y from the touch event ) I do the same like you:
SimpleVector position = new SimpleVector(Interact2D.reproject2D3D(world.getCamera(), fb, (int)x,(int)y, 10.f));
position.matMul(world.getCamera().getBack().invert3x3());
position.add(world.getCamera().getPosition());
Object[] result = world.calcMinDistanceAndObject3D(world.getCamera().getPosition(), position, .01F);
but the resulting float is always -> 1.0E12 == Object3D.RAY_MISSES_BOX
can you give mw a hint or a working example
Thanks
Ilse
P.S. I am using the last version from the main page (http://www.jpct.net/jpct-ae/download/alpha/jpct_ae.jar)
I want to do the same like you, but I can get it working.
I use the demo and set the "plane" -> plane.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
then (with the x and y from the touch event ) I do the same like you:
SimpleVector position = new SimpleVector(Interact2D.reproject2D3D(world.getCamera(), fb, (int)x,(int)y, 10.f));
position.matMul(world.getCamera().getBack().invert3x3());
position.add(world.getCamera().getPosition());
Object[] result = world.calcMinDistanceAndObject3D(world.getCamera().getPosition(), position, .01F);
but the resulting float is always -> 1.0E12 == Object3D.RAY_MISSES_BOX
can you give mw a hint or a working example
Thanks
Ilse
P.S. I am using the last version from the main page (http://www.jpct.net/jpct-ae/download/alpha/jpct_ae.jar)