How would one go about detecting if two images on the screen (form) were touching each other in C#?
I have a little game where I have to find out if two objects (images of objects) are touching each other.
Is there a simple way to implement this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The quick n’ dirty way is to check the bounding rectangles:
If you want pixel-perfect detection on stuff involving transparancy, it gets a lot more complicated.