Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Ilse

Pages: [1]
1
Support / Re: How to do 2D click to 3D object picking?
« on: July 18, 2010, 09:03:28 am »
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)

Pages: [1]