Selecting 3D objects with the mouse
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
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
http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/000905.html
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement