PDA

View Full Version : Walking through walls



Zeus_666
06-20-2001, 02:18 AM
Hi,
How would i go about stopping the camera walking through walls. My walls are at present just rectangles.

Thanks

Paul

ffish
06-20-2001, 02:52 AM
Look up the topic "collision detection" on google or this board.

RCMaster
06-20-2001, 02:58 AM
You have two ways to achieve this :
- either you use a free 3D engine which deals with that kind of thing;
- or you start implementing yours ; in that case, you will have to test the position of your camera against :
+ all the walls (simple but not efficient at all)
or
+ the walls nearby your camera (you must be able to determine which are the walls nearby your camera)

I would personaly recommend the second one, i.e. start writing your own engine, in so far as it will help you understand how these 3D engines work.

Good luck !

ffish
06-20-2001, 03:32 AM
Some more topics to look up include BSP, octrees, quadtrees, PVS, portals, bounding boxes, AABB, etc, etc. The list is never-ending! http://www.opengl.org/discussion_boards/ubb/smile.gif

Zeus_666
06-20-2001, 03:50 AM
Ok, I came to a branch this morning, Collision detection, OpenGL programming book (Lighting) or level editor. I have discovered that the level editor and the collision detection require more research, so i will get on with lighting. Some of those terms you just mensioned are later in the book i think.