One picture box can not collide or go through another

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
3 posts Page 1 of 1
Contributors
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

im making a game and i need help with one thing which is how can i keep one picture box from going into and out of another ex: when one picture box strikes another it stops and can not go the same way
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
NoWayIn
VIP - Donator
VIP - Donator
Posts: 444
Joined: Sat Nov 21, 2009 11:16 pm

You could use If picturebox1.Intersectwith(picturebox2.left) or something like that

You could also look up "Collision Detection"

I made one a really long time ago but I don't have the source anymore =\

I was trying to make a game too xD
it worked out okay, lots of bugs though
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

IntersectsWith takes a Rectangle as the argument, so it would be picturebox2.Bounds that you would want to check for.

I think this has already been partially answered here viewtopic.php?f=32&t=1894&p=11663
You should make the thread that moves your picturebox check to see that it is not intersecting with your other controls.
3 posts Page 1 of 1
Return to “Tutorial Requests”