Jump to content
  • Advertisement
Sign in to follow this  
sansured

Mesh Based Map

This topic is 4816 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone, i want to use mesh's (i am using .x format) for map in my D3D game engine.But collision detection is realy big problem for me i can't figure it out. For BSP map's there are too many examples and sample codes but i can't find good examples for mesh collsion. Do you have any idea,code samples or something else can help me?

Share this post


Link to post
Share on other sites
Advertisement
If the mesh is static, you can burn it into your bsp.

If it represents a dynamic character, you don't typically use the mesh itself for collision, but a simpler shape.

I use a capsule. More advanced engines might use a combination of spheres, capsules, boxes, and other shapes.

Share this post


Link to post
Share on other sites
SimmerD how do you burn it into the bsp?

@ sansured, hi, I'm trying to do something similar(ish), I don't think theres any really easy answer to using meshes. I wanted to use them really for ease of use (loading models & scenes etc).
The way I'm trying to do it, is to turn a mesh into a poly soup thing, basicly load your mesh, get the vertex & index buffers (meshes are rendererd in indexed triangle lists), then make a new vertex buffer, for the number of indices, this way you can then (hopefully), get 3 vertices for each triangle, then you can store these values (maybe get the normals as well for direction), and do normal triangle - plane collision.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!