• Advertisement

Archived

This topic is now archived and is closed to further replies.

Guest Anonymous Poster

d3dim view matrix

This topic is 6635 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Guest Anonymous Poster
this is what oiim doing........


D3DMATRIX vm = identitymatrix; //view matrix
D3DMATRIX tvm; // temporary view matrix
int cang; // camera angle

if (cam[6]) cang++;
if (cam[7]) cang--;

RotY(vm, rad(cang)); //rotate view around y axis

pd3dDevice->GetTransform(D3DTRANSFORMSTATE_VIEW, &tvm);

vm._41 = tvm._41;
vm._42 = tvm._42;
vm._43 = tvm._43;

if (cam[0]) vm._42-=1.f;//=10.f;
if (cam[1]) vm._42+=1.f;
if (cam[2]) vm._41+=1.f;
if (cam[3]) vm._41-=1.f;
if (cam[4] && (vm._43> -100.f)) vm._43-=1.f;
if (cam[5]) vm._43+=1.f;


pd3dDevice->SetTransform(D3DTRANSFORMSTATE_VIEW, &vm);

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
is the you translate and rotate the view matrix and the world matrix different?

im trying to make the view work like a fps, so that the camera rotates around its origin or from where it is at but it just rotates around the world's orgin.

how do i make the view rotate around the position it is at? i rotate an identity matrix and set the _41 _42 _43 to the position then settransform the view but it still rotates around the origin.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
hmmmmmmmmm up = down with the view matrix.

Share this post


Link to post
Share on other sites

  • Advertisement