VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Image Collision

Mathieu Tremblay  (1 Submission)   Miscellaneous   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

Verify if two images will hit if you do move one of the image of X left and X right. Very useful when programming actions, sports or rpg games.

Inputs
MovingImage = the image to move moveLeft = the Left movement of the MovingImage moveTop = the Top movement of the MovingImage StaticImage = the image you don't want to hit

Returns
Return if the two images would hit ( True or False ).

Side Effects
The MovingImage will automaticly move if you don't erase the two folling lines of code: MovingImage.Left = MovingLeft MovingImage.Top = MovingTop

Rate Image Collision (4(4 Vote))
Image Collision.bas

Image Collision Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters