Hey,
I'm looking to obtain the screen (X and Y) co-ordinates of vertices.
Whenever I move my mouse over a vertex I want to change it's color, but don't know how to compare the mouse position with my vertices.
Any suggestions
Thanks
XNA Game Studio Express
Hey,
I'm looking to obtain the screen (X and Y) co-ordinates of vertices.
Whenever I move my mouse over a vertex I want to change it's color, but don't know how to compare the mouse position with my vertices.
Any suggestions
Thanks
Hello,
Perhaps you should obtain the vertices rendered on some X,Y screen coordinate instead of obtaining the ScreenX, ScreenY coordinates for all your scene's vertices. DirectX does this for you and calls it picking. As far as I know there is no such feature in XNA yet but here's a good tutorial on the subject:
http://www.thehazymind.com/archives/2005/10/tutorial_9_picking_objects_fro.htm
Cheers
Joao Nogueira