Archived

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

Placement - Your opinion

This topic is 5019 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

Howzit How would you do this. I''ve imported a 3D model and I''ve placed it in the centre of the screen by using glTranslatef. I do this to keep the character in the middle of the screen. I place buildings by adding or subtracting a certain amount from the imported 3D co-ordinates. This way, when I move, the buildings stay in the same place. This works well but it''s making collison detection very difficult. How would you do it? Shot

Share this post


Link to post
Share on other sites
the first question is: what does rendering have to do with collision detection? your buildings have certain positions in the world (and most likely a bounding volume), your player has a position in the world. the bounding volumes should be kept in world coordinates anyway so figuring if your player is running into anything shouldnt be a problem and is completely independent of how you render your stuff.

if all buildings are unique you can just put them in the right place by transforming their vertices once after loading. else youd either do the whole translate/rotate stuff before drawing or keep a matrix for each building.

[edited by - Trienco on March 18, 2004 6:17:51 AM]

Share this post


Link to post
Share on other sites