Results 1 to 2 of 2

Thread: Collision detect

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2000

    Collision detect

    I have some question about collision detect.
    I was thinking how to make one, and come to the selection render mode. I was thinking if I could draw only one point then I could check if both object are drawn at this point.
    My problem is that I don't know how to do it.
    I can check which object is at a final screen coordinate, but I want to check it in real world coordinates (x,y,z).
    I have another question. How can I get the final vertex coordinates?
    I mean I define a few vertices and then I move and rotate and scale them. How can I get the transformed vertex coordinates.

    Thanks in advance

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Shreveport, LA, USA

    Re: Collision detect

    I'm assuming you mean you use glRotate, glScale, and glTranslate. Well, you can continue to use those, in which case you'll need to copy the modelview matrix after all transforms have been concatenated and then multiply the object's vector(s) by the modelview matrix. The better way I believe is to use your own matrix routines for translating, rotating and scaling. Then when you transform the vector by your view matrix, you automatically have the coordinate(s) to use for both drawing and collision detection. BTW you want to set GL's modelview matrix as an identity matrix when you do it this way.

Similar Threads

  1. Replies: 4
    Last Post: 10-23-2016, 01:36 PM
  2. How to detect that a GPU can have an RGB FBO?
    By kturkowski in forum OpenGL ES
    Replies: 0
    Last Post: 11-19-2013, 05:46 PM
  3. Col detect.
    By RedZen in forum OpenGL: Basic Coding
    Replies: 13
    Last Post: 07-13-2001, 08:49 AM
  4. collision detection contest: collision crazy
    By in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 09-19-2000, 02:33 AM
  5. How to detect 2 objects' collision?
    By SiuBanana in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-02-2000, 01:44 PM

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