Archived

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

Raeldor

Selecting 3D objects with the mouse

Recommended Posts

Hi all, I have implemented a mouse in my game using an untransformed polygon, which I move my passing the DirectInput mouse events. Seems to work pretty well. My question is, when clicking on the screen how do I find out which object I am clicking on. I assume there it must be some kind of Ray intersection test with the objects in the scene, but how do I calculate the Ray vector etc. from the screen position? Many Thanks Rael

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I know this is for directx but check out this thread, I use a modified version of it and it works very well.

http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/000905.html

Share this post


Link to post
Share on other sites