• Advertisement
Sign in to follow this  

Problem with terrain (or map) !

This topic is 2683 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'm new in directx 9 so sorry if my questions are stupid. I use Google SketchUp for my models. My first terrain was a tunnel long and straight , so I put it in a boundingBox. It was pretty easy to check for collisions and set up the camera.
But now i've got a big problem. My tunnel is the same but it's curved. I think a lot but i don't know how to check the collision with walls. Everytime I go through it. Can anyone help me ?

Thanks Seb

Share this post


Link to post
Share on other sites
Advertisement
I'm not familiar with Google Sketchup. However, for a simple approach: if you can load your models into a D3DXMesh, you can "shoot" rays from a position against the mesh and determine the distance from that position to the mesh. Take a look at the documentation for D3DXIntersect.

Share this post


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

  • Advertisement