Hi,
I have a problem with collision detection of two objects. I use Ray-Polygon method, problem is that when a cube is coliding with a longish cuboid, the collision event come just when i hit the long side of the cuboid, when i try to hit the cuboid from the top, the collision event come when the cube is a little bit in the cuboid, so it is not so precise. How can i make to receive collision events when the objects just touches each other? I tried to change the collideOffset, but with no result.
here is the setup for the collison mode:
Cube.setCollisionMode(Object3D.COLLISION_CHECK_SELF );
Cuboid.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
and this is how i call the checkForCollision method :
cube.checkForCollision(movingDirection, 1)
I am also not sure what does the "step" argument in checkForCollision function mean. should that be the actual speed of the cube?
and there is the collisonListener :
Cube.addCollisionListener(new CollisionListener() {
public void collision(CollisionEvent ce) {
Log.e("COLLISION"," ");
}
public boolean requiresPolygonIDs() {
return false;
}
});
PS: Sorry for my English