D3D Camera

Chamma

Newcomer
Joined
Jul 21, 2003
Messages
1
Location
Manchester, UK
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]
 
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
 
Back
Top