Main Menu
Menu

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.

Show posts Menu

Messages - spidercpsf

#1
Support / About CollisionListener in Android
August 22, 2011, 08:18:50 AM
Hello everybody.
Now I am programming game by jpct-ae.
I want check collision (source and target) but I can't.
my code is:

SimpleVector dir=Interact2D.reproject2D3DWS(cam, fb, (int)xpos, (int)ypos-44);
Object[] res=world.calcMinDistanceAndObject3D(cam.getPosition(), dir, 10000 /*or whatever*/);


thing[3].addCollisionListener(new CollisionListener() {

@Override
public boolean requiresPolygonIDs() {
// TODO Auto-generated method stub
return false;
}

@Override
public void collision(CollisionEvent ce) {
// TODO Auto-generated method stub
Log.d("PickCollision", "colision");
}
});


when I touch to object, it worked. But when I move object to collision, it don't work.
thank you!