Moving Milkshape Models w/out translatef

Started by
0 comments, last by Magicchessmaster 22 years, 8 months ago
I would like to have more control over my Milkshape Models. i cannot figure out how to access a center point on a model (x,y,z) that i can change to change the position of my Model in OpenGL. The only thing i can figure out is to use Translatef() before my call to pModel->draw(). i believe that this will cause problems down the line, since it would be more difficult to determine collision and to move a possible 100 models in different directions simultaniosly. can anyone tell me how to find that center point and use it to move my models??
Advertisement
You''ll have to use translatef at some point, it just means you have to do the same when doing collision detection.

To find the centre of the model, you should just be able to do the averages of the (x,y,z) values for all the vertices.

~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
~~~Cheers!Brett PorterPortaLib3D : A portable 3D game/demo libary for OpenGLCommunity Service Announcement: Read How to ask questions the smart way before posting!

This topic is closed to new replies.

Advertisement