Sign in to follow this  
NightCabbage

Unity Mouse selection in a 3D world (cont)

Recommended Posts

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?

Share this post


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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this