May 19th, 2012, 07:36 AM
Need help with object collision
I am new to the forums and I am not quite sure how to approach the problem I have at the moment. I currently have a control array of 60 Image boxes. These image boxes cannot overlap each other. They stop when one collides into the other.
The image boxes are named Image1(0), Image1(1), Image1(2).....Image1(60). I know how to write the programming when something else hits it, but not when they hit each other. For example, this is what I have when a DIFFERENT image box hits it from the top, the other image box being FallImage(0):
For Index = 0 to 60
If FallImage(0).Top + FallImage(0).Height > Image1(Index).Top And FallImage(0).Left + FallImage(0).Width > Image1(Index).Left And FallImage(0).Top < Image1(Index).Top + Image1(Index).Height And FallImage(0).Left < Image1(Index).Left + Image1(Index).Height Then
Timer4.Enabled = False
So if anyone has any ideas as to how I can get that same effect with just Image1 I would very much appreciate it.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.