Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Im just wondering if anyone knows any good camera routines to use. I have tried manipulating Matrix.LookAtLH but i want to be able to rotate round the z axis to get a "look around" view and on the x axis to get a "look up and down" view.

 

I had a look at the particle emiter under samples on the dx sdk. But my camera rotates on the y axis for "look around" and i dont know how to rotate it... I can post the code i have so far if it helps.

 

[edit]Also i'm using C# to develop in[/edit]

  • 1 month later...
  • 4 weeks later...
Posted

Rotating the camera

 

You should be able to build a freely rotating camera using

 

Matrix tm = Matrix.Translation(camera_position)

Matrix rm = Matrix.RotationYawPitchRoll(xrotation,yrotation,zrotation)

Matrix wm = tm.Multiply(rm)

Then just use wm as the ViewMatrix

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...