1 Attachment(s)
[RESOLVED] Detect If Colliding With Certain Part of A Picturebox?
Hello vbforums!
I Have A Collision Detection Problem/Question....
Is It Possible To Detect If I am Colliding With The Top Part of A Picturebox?
So If I hit the Bottom It does Nothing If I hit the Top It Shows Let's Say A Messagebox?
Heres and Example of What Im trying to Achieve:
Attachment 118389
Thanks to Anyone Who Can Help
PS: im using VS2013 .Net 4.5.1 or 4.5
Re: Detect If Colliding With Certain Part of A Picturebox?
try this:
Code:
'ball is a moving picturebox
'PictureBox1 is the pb where i test for collision with the top half
If ball.Bounds.IntersectsWith(New Rectangle(PictureBox1.Location, New Size(PictureBox1.Width, PictureBox1.Height \ 2))) Then
MsgBox("hit")
End If
Re: Detect If Colliding With Certain Part of A Picturebox?
Thank You Exactly What I was looking for!