Skip to main content
GameDev.net gamedev.net
🔒 Locked

Mesh As Levels

Started by DX_GAMEDEV_2004 Apr 17, 2004 at 6:02 AM 0 replies 300+ views
Original Post
DX_GAMEDEV_2004
DX_GAMEDEV_2004
Hello people, Loading meshes as levels seems a good idea, however... I load a mesh as a level- it contains simply the walls, floors and ceilings. I also have a first person camera which can navigate this small room. I would like to ensure the camera can only remain inside the room and not pass through walls or ceilings etc... Does anybody know how I can determine when the camera intersects with the mesh so that I may prevent it from moving further? Your assistance is appreciated.
baumep
baumep
The basic idea is to represent your camera as a point or sphere and then do the collision/sweep tests against all potential colliding surfaces.
I can''t give you a quick answer on how to do it but you might look up some tutorials on collision detection. There''s a very good and easy one at flipcode.
Gamasutra has a nice article with a collection of intersection tests for games.
baumep

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.