2D colision with vector map

This is a discussion on 2D colision with vector map within the Game Programming forums, part of the General Programming Boards category; Originally posted by Hunter2 How so? I DID include the "if moving up and right" part, you realize... whoops, I ...

  1. #16
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Originally posted by Hunter2
    How so? I DID include the "if moving up and right" part, you realize...
    whoops, I missed that part. It would still be difficult and messy, though

    Ummm... to solve the problem with the angle to one of the outside walls being greater, you could test to find the shape with the closest midpoint (combining my two methods) and then find the greatest angle on that shape. Or you could represent the outside wall with smaller line segments. Or, if you're moving in small enough steps, it won't be a problem when the point gets right up to the wall, because that angle will be almost 180 degrees.
    Away.

  2. #17
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    >>Also, XSquared, I don't understand your method... Isn't B always going to be greater than A, since it is A+something?
    Attached Images Attached Images  
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #18
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Oh, IC what you mean now...
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  4. #19
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    There are two collision detection tutorials here
    Away.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 2D in directX
    By fighter92 in forum Game Programming
    Replies: 6
    Last Post: 01-25-2009, 11:23 AM
  2. Help with 2d arrays
    By thamiz in forum C Programming
    Replies: 25
    Last Post: 05-25-2008, 06:06 AM
  3. Best Graphics Library for 2d RTS?
    By arew264 in forum Game Programming
    Replies: 4
    Last Post: 04-18-2007, 01:05 PM
  4. Replies: 16
    Last Post: 09-22-2006, 04:39 PM
  5. Read file in 2D array
    By Chook in forum C Programming
    Replies: 1
    Last Post: 05-08-2005, 01:39 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21