Jump to content
  • Advertisement
Sign in to follow this  
toonist

ODE trimesh collision problem

This topic is 4103 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

I have been trying to figure out what is wrong with my ODE trimesh collision integration for the past few days, but I just can't figure it out. When a sphere (with physics) collides with a trimesh, it sinks into it and then shoots to a funny direction. Here is the code that I use to initialize my trimesh: -------------------------------------------------------------------------- triMeshData = dGeomTriMeshDataCreate(); dGeomTriMeshDataBuildSingle1(triMeshData, mesh->mb->vert, sizeof(f32)*3, mesh->mb->numVertices, mesh->mb->ODEVertIdx, sizeof(u32)*3, mesh->mb->numFaces*3, mesh->mb->normal); geom = dCreateTriMesh(Driver::getSceneManager()->space, triMeshData, 0, 0, 0); -------------------------------------------------------------------------- The position and physics (if either of them is set) are updated per frame. u32: typedef unsigned int f32: typedef float mesh->mb->vert: continuous one-dimensional array of vertice data (3 components, xyz) mesh->mb->ODEVertIdx: continuous one-dimensional array of vertex index data mesh->mb->normal: continuous one-deminsional array of normal data (3 components, xyz) [Edited by - toonist on May 24, 2007 8:08:31 AM]

Share this post


Link to post
Share on other sites
Advertisement
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!