HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Collision Detection (C#)

03-28-2007, 12:21 AM#1
Mapz_Maker
in a game im making i need to detect if a mesh is about to collide with something. im using mesh.Intersect to do this but how would i do it for 360 degrees in all directions (x, y, z) and return the distance of the closest collision found with C#? Any Code?
03-28-2007, 02:31 AM#2
wyrmlord
What shape is the mesh (is is simply a sphere, cylinder, etc or a few of them)? How exact do you need the collision to be? Obviously if the mesh was the shape of a person, you'd perhaps have to check every single polygon in the mesh to be exact (which would be very slow). I'd have to know more about the shape of the mesh to say more.
04-28-2007, 03:47 AM#3
Mapz_Maker
oops, forgot about this thread. umm, what happens is i am using directx which has built in function for detecting collisions between meshes. the problem is that it only check it in one vector. (aka. you specify a start location of the ray, then a direction and it returns info about what happened when the ray collided [distance, etc]) but how would i send rays in all directions with just while loops or whatever?