Author Topic: how to check event touch on Object3D?  (Read 939 times)

Offline ngvannam5

  • byte
  • *
  • Posts: 7
    • View Profile
how to check event touch on Object3D?
« on: May 08, 2012, 09:39:58 am »
I have Object3D in skybox background. While I move camera then Ojbect3D move.
How to check event touch on Object3D miss?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: how to check event touch on Object3D?
« Reply #1 on: May 08, 2012, 08:34:16 pm »
I don't get the question... ???

Offline ngvannam5

  • byte
  • *
  • Posts: 7
    • View Profile
Re: how to check event touch on Object3D?
« Reply #2 on: May 09, 2012, 04:08:52 am »
while touch on screen check width position of Object3D?

Offline denzel

  • byte
  • *
  • Posts: 22
    • View Profile
Re: how to check event touch on Object3D?
« Reply #3 on: May 09, 2012, 06:05:33 am »
Do you mean to "pick" a object3d?
if so ,search mouse pick in forum for more details
set the collision mode in your object3d and then
Code: [Select]
SimpleVector simpleVector = Interact2D.reproject2D3DWS(
camera, frameBuffer, touchX, touchY).normalize();
Object[] ii = world.calcMinDistanceAndObject3D(camera
.getPosition(), simpleVector, 10000);

in ii[1] that's the object3d which be touched or null if nothing is been touched.

------------------------
Sorry i didnot get your question after a review
« Last Edit: May 09, 2012, 06:08:08 am by denzel »