Cursor click on object detection
Posted on 2008-02-07
I didn't get much luck with my last question so am re-wording it as I am closing in on the project deadline.
I have several objects (PrimitiveType.TriangleStrip) and have a cursor which i obviously can get the on screen co-ordinates of x and y although when i try and detect whether the cursor is over an object it doesn't work. I'm guessing obviously because my objects are being translated etc. about in the world.
Any way to find out the on screen co-ordinates of the objects?
I've been doing lots of googling and it looks like i need to project a ray from my 2d co-ordinates of the mouse through the world and check for intersections with my object!
Thanks for any help.