Results 1 to 3 of 3

Thread: How can I do collision detection in vb? Please read...please.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Posts
    65

    Post

    I'm making a 2D game in vb, and I need rectangular collision detection.

    Or, what I need is to make sure my character can't step on certain areas of the form, to be less complex sounding.

    If anyone can give me one way to do this, I will be forever grateful.

    Thanks in advance!

    ------------------
    "I'm carrying a Geometry book, but I'm not in Geometry...it's crazy...crazy man!"

  2. #2
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800

    Post

    I use this: If Abs(Image1.Left - Image2.Left) < Image1.Width And Abs(Image1.Top - Image2.Top) < Image1.Height Then ...and put whatever you want after Then. Hope it helps


    Steve

  3. #3
    New Member
    Join Date
    Nov 1999
    Location
    Penfield, NY 14526
    Posts
    3

    Post

    You can check to see if two bitmaps intersect using the IntersectRect API call.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width