Mesh Movement
I'm having some serious problems trying to figure out how to get a mesh to move around the screen when I use the arrow keys. Its not implementing the input system but rather getting the mesh to move. Does anyone know a link to a good tutorial for this.
I'm using Directx and C++.
I'm not sure what sort of effect you want to achieve so I will list a very simple example that moves the mesh left and right:
If this isn't what you wanted, you'll have to ask a more specific question.
float x = 0.0f;if (keyDown(Left)) x -= 2.0f;if (keyDown(Right)) x += 2.0f;D3DXMATRIX mat;D3DXMatrixTranslation(&mat, x, 0, 0);device->SetTransform(D3DTS_WORLD, &mat);renderMesh();
If this isn't what you wanted, you'll have to ask a more specific question.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement