How to get touched object 3D

Started by FeberT, August 10, 2011, 03:50:25 PM

Previous topic - Next topic

FeberT

Hello, I'm new to this engine and I dont know how to get the touched object 3d...
anyone could help? sorry for the bad english. ;)

Nemetz

Yes, just read in wiki about it.
http://www.jpct.net/wiki/index.php/Picking
Here is little example:

SimpleVector dir = Interact2D.reproject2D3DWS(cam, fb, x, y)
.normalize();
Object[] res = world.calcMinDistanceAndObject3D(cam.getPosition(), dir,
distProjection);

FeberT


FeberT

I couldn't get this to work... theres a sample application that I can download and see working?
Thanks Again

FeberT

It's Working! I forgot to set the ColisionMode...