Ну почему-то он не двигается с маста:
procedure TfrmD3D.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key = VK_ESCAPE then Close
else
if Key = VK_LEFT then wasL := True
else
if Key = VK_RIGHT then wasR := True
else
if Key = VK_UP then wasTop := True
else
if Key = VK_DOWN then wasDown := True;
end;
procedure TfrmD3D.DrawScene;
var
matView, matProj : TD3DMatrix;
matScale, matTranslate: TD3DMatrix;
begin
SetScaleMatrix(matScale, 0.1, 0.1, 0.1);
SetTranslateMatrix(matTranslate, 0, 0, 0);
if wasL then
begin
SetTranslateMatrix(matTranslate, -dx, 0, 0);
wasL := False;
end;
if wasR then
begin
SetTranslateMatrix(matTranslate, dx, 0, 0);
wasR := False;
end;
if First then
begin
matWrk := matScale;
First := false;
end else
matWrk := MatrixMul(matWrk, matTranslate);
FD3DDevice.SetTransform(D3DTS_WORLD, matScale);
FD3DDevice.DrawPrimitive(D3DPT_TRIANGLELIST, 0, 110);
SetViewMatrix(matView, D3DVector(0, 0, -3), D3DVector(0, 0, 0), D3DVector(0, 1, 0));
FD3DDevice.SetTransform(D3DTS_VIEW, matView);
SetProjectionMatrix(matProj, 1, 1, 1, 10);
FD3DDevice.SetTransform(D3DTS_PROJECTION, matProj);
end;