I have a couple questions regarding a game I'm creating in visual basic 5. I have a collision event that detects when an asteroid hits the ship and when a bullet hits an asteroid. However, the detection seems to be off a little, especially for the bullet/asteroid collision. Here is the code I have for the event:
If bulletPic.Bounds.IntersectsWith(cometImage.Bounds) Then
cometImage.Hide()
MsgBox("Asteroid Collision.")
End If
If shipPic.Bounds.IntersectsWith(cometImage.Bounds) Then
shipPic.Hide()
MsgBox("Asteroid Collision.")
End If
Is there a way to code the collision event so that the detection is more accurate? I have a feeling it's because I'm using picture boxes to hold the images, but I am not sure as to how to go about this another way. Any help would be greatly appreciated.
If bulletPic.Bounds.IntersectsWith(cometImage.Bounds) Then
cometImage.Hide()
MsgBox("Asteroid Collision.")
End If
If shipPic.Bounds.IntersectsWith(cometImage.Bounds) Then
shipPic.Hide()
MsgBox("Asteroid Collision.")
End If
Is there a way to code the collision event so that the detection is more accurate? I have a feeling it's because I'm using picture boxes to hold the images, but I am not sure as to how to go about this another way. Any help would be greatly appreciated.