if i want collision between two objects. lets say object 1 is ball and object 2 is box. than in java i can use the getBounds().int ersects methods to test if they both are colliding.
so my question is that is there a function in android that i can use?
here is what i found out on google but nore 100% sure.
so insert of using
i can use
to test if collisionr.
wasnt working for some reason. i also tried "intersects " but doesnt work
so my question is that is there a function in android that i can use?
here is what i found out on google but nore 100% sure.
so insert of using
Code:
public Rectangle getBounds() { return ... }
Code:
public Rect getBounds() { return ... }
Code:
if (ball.getBounds().intersect(box.getBounds())) { }
Comment