Mouse selection in a 3D world (cont)

Started by
1 comment, last by NightCabbage 16 years, 1 month ago
Continued from: http://www.gamedev.net/community/forums/topic.asp?topic_id=472952 So just out of interest... can (should) you use D3DXIntersect for this task? Or is that unrelated...? Or is there just a better method for doing this?
Advertisement
You can use D3DXIntersect for picking. Or you can make your own code that "transforms" 3d world in 2d canvas, and loop through triangles checking which triangle is passing through your picking ray, and if there are more of them which one is closest to camera.

There is D3DXIntersect example in DXSDK.
Which method is better / faster?

This topic is closed to new replies.

Advertisement