Hi everyone,
I''ve been coding for a relatively short time and your sight has inspired me to learn more especially about opengl!!. I was wondering if you could help me out with a small problem I''m having. I''ve been working on writing a 3d game engine... I was inspired by tutorial 10 (3d world) on nehe''s site. And thought I''d add collision detection... sound music objects(static and dynamic) and the ability to clreate the world from a text file. with the text file symbolising an overhead view with diffrent textures represented by diffrent characters. ie.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
A A A A
AAAAAAAAAA AAAAAAAAAAAAAAAAAA
A A
I''ve just started so far I''ve got the world loading from the file and I''ve implemented some crude collision detection. My problem lies with the collision detection

.
I''m using a bounding box technique. For each object read in I store a
- Maximum X value
- Minimum X value
- Maximum Z value
- Minimum Z value
which is a Glfloat.
Then each frame I check to see if the proposed posiotn to move to is within these values If so I don''t move else I move. Simple.

. This works fine when walking straight up to a wall or object the problem is when I look around( rotate) . The world rotates around me(I think) and therefore if I walk backwards into a wall or turn around when close to a wall I end up in it... Do I need to rebuild my bounding boxes everyframe. Is there some simple logic I''m missing???? Any-help will be very much appreciated!!!!!.
Once again thanks for the great site

------------------------
what about y20k?