Author Topic: How to get touched object 3D  (Read 3051 times)

Offline FeberT

  • byte
  • *
  • Posts: 4
    • View Profile
How to get touched object 3D
« on: August 10, 2011, 03:50:25 pm »
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. ;)

Offline Nemetz

  • int
  • **
  • Posts: 53
    • View Profile
Re: How to get touched object 3D
« Reply #1 on: August 10, 2011, 04:13:29 pm »
Yes, just read in wiki about it.
http://www.jpct.net/wiki/index.php/Picking
Here is little example:
Code: [Select]
SimpleVector dir = Interact2D.reproject2D3DWS(cam, fb, x, y)
.normalize();
Object[] res = world.calcMinDistanceAndObject3D(cam.getPosition(), dir,
distProjection);

Offline FeberT

  • byte
  • *
  • Posts: 4
    • View Profile
Re: How to get touched object 3D
« Reply #2 on: August 10, 2011, 04:18:42 pm »
Thanks for the help

Offline FeberT

  • byte
  • *
  • Posts: 4
    • View Profile
Re: How to get touched object 3D
« Reply #3 on: August 10, 2011, 04:32:03 pm »
I couldn't get this to work... theres a sample application that I can download and see working?
Thanks Again

Offline FeberT

  • byte
  • *
  • Posts: 4
    • View Profile
Re: How to get touched object 3D
« Reply #4 on: August 10, 2011, 05:10:20 pm »
It's Working! I forgot to set the ColisionMode...