Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

updating world coords

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 taybrin   Members   

122
Like
Likes
Like

Posted 10 October 2001 - 06:43 PM

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 . . .

#2 Jankey   Members   

122
Like
Likes
Like

Posted 10 October 2001 - 08:27 PM

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!




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.