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


figuring out relative translation

Recommended Posts

Ok, so lets say I''m trying so simulate a person throwing a grenade. Before the person releases the grenade, I translate the camera, draw an axis system, translate to where the person is standing, draw the person with genade in hand. However, after the person releases the grenade, I want to draw it as a seperate entitiy from the human. How would I go about doing this (I''m not asking for physics help)? In other words, how do I figure out the translation vector from the origin (center of the drawn axis) to the person''s hand right where the grenade is released. If I don''t have this, I would have to do all of the translations and rotations I did on the human every time I wanted to draw the grenade in order to get it into the right place, correct? I tried to use glGet with GL_MODELVIEW_MATRIX to get the points in space, but everything I did with spacial points started crapping out once I started to rotate the camera. Sorry if I''m unclear, but thanks for the help in advance.

Share this post

Link to post
Share on other sites