Hey, guys, whats'up?
I am TRYING to develop an simple 2D interface with jPCT-AE: its just a 2D button which, when I press it, the 3D displayed model is changed by another model. For doing this, I'm using object picking, but it just doesnt work! Actually, it works. But it shows that the button was "picked" in screen points outside of the button area (the button is just a plane).
Do you know what I am missing here?
My code for collision is:
public boolean checkCollision(int x, int y)
{
dir = Interact2D.reproject2D3DWS(world.getCamera(), fb, x, y).normalize();
Object[] res = world.calcMinDistanceAndObject3D(world.getCamera().getPosition(), dir, 300 );
if (res[1] != null && res[1] == nextBt)
return true;
return false;
}
This method is called by the main activity when the user touches the screen.
Thanks!
RhoX