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/11/23 10:12 UTC
Read the original article Hit count: 159

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)
{   
    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