Bitmap & Object Collision Help

Posted by MarkEz on Game Development See other posts from Game Development or by MarkEz
Published on 2011-06-25T20:12:12Z Indexed on 2011/06/26 0:31 UTC
Read the original article Hit count: 194

Filed under:
|
|

Is it possible to detect when an object and a bitmap collide. I have an arraylist of sprites that I am shooting with an image. I tried using this method here but as soon as the bitmap appears the sprite disappears, this is in the Sprite class:

public boolean isCollision(Bitmap other) {

 // TODO Auto-generated method stub 
 if(other.getWidth() > x && other.getWidth() < x + width && >other.getHeight() > y && other.getHeight() < y + height);
return true;   }

© Game Development or respective owner

Related posts about collision-detection

Related posts about java