Noobie Direct3D Help
Graphics
1
Posts
1
Posters
0
Views
1
Watching
-
Hey guys, first post on the forums (Hopefully I'm posting in the right section). I'm fairly new to the Direct3D World, so I'm making the "Hello world" program (aka, the rotating triangle). Well, I wanted to take it a bit further, and rotate my triangle on the Y axis, but translate the position using the mouse position. For instance, if my mouse was at screen coordinates, (15,15), I would want the triangle to rotate, with the top point of the triangle at the coordinates (15,15). The problem is: POINT pos; GetCursorPos(&pos); D3DXMATRIX Trans; D3DXMatrixTranslation( &Trans,(FLOAT)pos.x,(FLOAT)pos.y, 0.0f); Doesn't work in screen coordinates :-D. How can I do this? Thanks!