Collision detection

Put your problem here if it does not fit any of the other categories.

Collision detection

Postby venkat » Wed Nov 28, 2007 4:33 pm

Can u any one tell me, how to detect collision between two images....

Thanks :)
venkat
Senior Developer
Senior Developer
 
Posts: 152
Joined: Tue Nov 27, 2007 5:42 am
Location: India

Top

Postby lordhong » Wed Nov 28, 2007 4:41 pm

:shock: i'd say you need to calculate the region each image takes, and calculate if image A overlaps image B (x,y coordinates etc.) It's easy for regular shaped images, like square, circule etc, but for irregular shaped images, you need to defined the points (on the image) that matters. :roll: maybe there's a better way...
lordhong
Developer
Developer
 
Posts: 42
Joined: Thu Nov 22, 2007 5:25 am
Location: New York

Postby plusminus » Wed Nov 28, 2007 5:01 pm

Hello venkat,

for Rectangular objects it is pretty easy, as you just have to think of the Vertex-Points.

Round or irregular shaped images are much harder to manage :!:

Have a look here it sounds interesting. (Goes from easy to harder) :!:

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 9 guests