View Full Version : Walking through walls
06-20-2001, 03:18 AM
How would i go about stopping the camera walking through walls. My walls are at present just rectangles.
06-20-2001, 03:52 AM
Look up the topic "collision detection" on google or this board.
06-20-2001, 03: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)
+ 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 !
06-20-2001, 04: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
06-20-2001, 04: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.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.