Direct X transformation?
-
hi , i have a mesh model and i put it in many places in my app. using the world transformation and i want to detect which mesh is the pointed one but when i point to mesh it only detects the last mesh has been transformed .
What do you mean by "the pointed one"? This is a little too non-technical to answer. :confused:
Microsoft MVP, Visual C# My Articles
-
What do you mean by "the pointed one"? This is a little too non-technical to answer. :confused:
Microsoft MVP, Visual C# My Articles
-
You can get the mouse position at any time using the static
Control.MousePosition
property. You could transform these coordinates to your world space and get the mesh you need, or if you click on it you can get the client coordinates and transform these. When you say you are getting the last mesh that was rendered, do you mean that you're destroying and re-creating your mesh with each drawing phase, and that you get the last one rendered? You probably don't need to destroy your mesh each time, though you would have to get the materials and textures from it to draw. I'm sorry if I don't understand your problem.Microsoft MVP, Visual C# My Articles