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.


Topics - spidercpsf

Pages: [1]
1
Support / About CollisionListener in Android
« on: 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:

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

Code: [Select]
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!

Pages: [1]