• Advertisement

Archived

This topic is now archived and is closed to further replies.

updating world coords

This topic is 5946 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

okay i have this car defined in its own coordinate system. I then use OpenGL to rotate, move, scale it down to the world coordinate system. My problem is that I am trying to do some simple point in polygon collision detection, but I need to take my description of the car in its local system and make it have a set of world coordinate points. I figured I could just mimic what OpenGL does and scale, rotate and translate it. The only point of the car that I do update this way and that works is its center point. Then I call glTranslatef(cenx, ceny, 0); glRotatef(somedirection, 0, 0, 1); glScalef(sx, sy, 1); This is how i draw the car, some my question is, how do i accurately keep a copy of the rest of teh car''s points in world space. I hope this makes sense, if anyone needs clarification please let me know, i have been toiling at this for some time now . . .

Share this post


Link to post
Share on other sites
Advertisement
If i checked what you mean, you scale, rotate & translate your object ... and want to use Collision Detection for your object,

If you load your Object, Scale it in Loading time ( by Updateing the Vertex Array, or the triangle list )

If you have a good understanding of vectors ... translate & rotate the Vector to the Car system ( so you dont have to Rotate & Translate the whole object! ) it should work


J@nkey ... if you have questions ... mail me!

Share this post


Link to post
Share on other sites

  • Advertisement