Results 1 to 2 of 2

Thread: Need help understanding collision detection between Object and Ground ........ !@!

  1. #1
    Member Contributor
    Join Date
    Apr 2002
    brooklyn, ny

    Need help understanding collision detection between Object and Ground ........ !@!

    I would like to know how can I detect "collision" when Object (like CAR) drives on the ground.. You know wheels always touch the ground etc .. First I thought I would just get the hight of the Vertex on which the Wheel is located.. But how would I know where to look for this Vertex info in the array ( 1D or 2D ) ??? I think if I were using 2D ARRAY, I would just use the Wheels (X,Z) values, to specify the location (row, column) in 2D array where Vertex hight for this particular location is stored .. Is this how it is done ???? ( I assume that my ground lies in positive X,Z quadrant ) ...

    Is this the way it is done to detect the distance between an Object and the ground ? Or there is more efficient way ???

    Also in 3D racing games, I understand that Race Tracks for example are made using 3D programs such as 3Dmax .. So if you LOAD this track ( buildings, road, trees, barriers etc ) into the memory as a whole, how will you know which part of this track data to use for collision, or computing the position of the Car on the Track, ( so when the car goes off the Track, you should hange to off road conditions etc ) ....

    Anyone can TRY to explain that to me ? LOL> thx in advance

  2. #2
    Senior Member Regular Contributor
    Join Date
    Sep 2001
    macedon, ny

    Re: Need help understanding collision detection between Object and Ground ........ !@!

    Ok, this is a VERY hard subject. Fast Effiecent Collition detection is not very easy to do, but here is a small crash course.

    This is how my collision detection is implemented, changed just a bit to work with cars and a track.

    The track is simply a series of triangles, each triangle in that series, has a normal vector. (which tells the PC what way is up for lighting). The wheels of the car are in effect spheres, with 2 sides cut off. You can very quickly find the distance between the sphere and the normal "plane" with a dot product of the sphere center and the plane normal - the spheres radius. With this you can tell if you are touching the plane or if you have gone through the plane, or if you are not touching it at all. (with some math ofcourse) However, this only tells you if you have hit the "plane that the Triangle lies on, you must then check to see if you have actualy hit the triangle, this can be done in a number of ways.

    I could go on, and on, and on, (you get the point) go here instead, it is what got me started in the lovely world of Collision Detection.

Similar Threads

  1. Collision Detection
    By DeclanMcgee11 in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 04-09-2015, 07:29 AM
  2. Collision detection
    By GLUTtony in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 12-09-2008, 02:53 AM
  3. Collision detection
    By torbjorn in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 10-24-2002, 10:28 PM
  4. collision detection contest: collision crazy
    By in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 09-19-2000, 02:33 AM
  5. Collision detection
    By CyBBe in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-18-2000, 10:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean