Archived

This topic is now archived and is closed to further replies.

Detecting the floor?

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

So far I have created an indoor world in 3ds max and have it loaded in my app as a .x file, and I have a working camera class. The next step is to somehow find the height of the floor directly beneath the camera. I was just curious as to what would be the best way to go about doing this. Any help would be appreciated.

Share this post


Link to post
Share on other sites
Well for general collisions with mesh objects you can use the D3DX functions for firing a ray and determining a collision point, I think one is D3DXIntersect or something. But in general I think you would be better to preprocess your 3D data so you have the floor as a seperate data representation and can then optimise your collision

Share this post


Link to post
Share on other sites
Yea, you could do that: make the floor a separate mesh, and then run collision detection and response just against that mesh.

If you need help with collision detection, I strongly recommend that you really read and understand this article. Also, Paul Bourke''s site is awesome.


Dustin Franklin
Mircrosoft DirectX MVP

Share this post


Link to post
Share on other sites