Hi Guys,
im actually working on a D3D9 Project... whos wondering?
I admit that this is my first project in DirectX, so i have a lot of questions for yall.
But first of all, ill give you some information about the project.
So, its a kind of 3D-Mapviewer for the Game "Anno 1503" alias knows as "1503 A.D."!
Heres a screenshot of the current version:
Screen1_b.jpg [ 170kb ]
The program uses a class to load the "*.scp" - File and to create a 2D-Bitmap in memory, which is serving to create a Heightmap for the 3D-Mesh.
And now my problems are:
- I want to implement a first-person camera movement, because the actual one is very untidy and unwieldy.
So, what changes should i make to strafe left/right and forward/backward.
I guess it has something to do with the "Matrix.Translation"... but i cant get it working and i cant find a really good tutorial or example for this stuff...
And my last question for the moment is:
"How do I convert a pick rays intersection into a 3D World Space (x,y,z) coordinate??"
All tutorials and examples that ive found are covering on the Mesh-Class, but i create the landscape-mesh on the fly in an array...
Im grateful for every answer and suggestion...
And a big sorry for my bad english-grammar...
im actually working on a D3D9 Project... whos wondering?
I admit that this is my first project in DirectX, so i have a lot of questions for yall.
But first of all, ill give you some information about the project.
So, its a kind of 3D-Mapviewer for the Game "Anno 1503" alias knows as "1503 A.D."!
Heres a screenshot of the current version:
Screen1_b.jpg [ 170kb ]
The program uses a class to load the "*.scp" - File and to create a 2D-Bitmap in memory, which is serving to create a Heightmap for the 3D-Mesh.
And now my problems are:
- I want to implement a first-person camera movement, because the actual one is very untidy and unwieldy.
Code:
wMatrix = Matrix.Identity
wMatrix = Matrix.Translation(New Vector3(__CamX, __CamY, __CamZ))
wMatrix = Matrix.Multiply(wMatrix, Matrix.RotationZ(__AngleZ))
wMatrix = Matrix.Multiply(wMatrix, Matrix.RotationX(__AngleX))
wMatrix = Matrix.Multiply(wMatrix, Matrix.RotationY(__AngleY))
wMatrix = Matrix.Multiply(wMatrix, Matrix.Scaling(__ScaleZ, __ScaleZ, __ScaleZ))
__device.Transform.View = Matrix.LookAtLH(New Vector3(-(_TWIDTH * 0.5), _TWIDTH * 0.5, 150 + __CamZ), _
New Vector3(_TWIDTH * 0.5 + __CamX, _TWIDTH * 0.5 + __CamY, 0), _
New Vector3(0, 1, 0))
__device.Transform.World = wMatrix
I guess it has something to do with the "Matrix.Translation"... but i cant get it working and i cant find a really good tutorial or example for this stuff...
And my last question for the moment is:
"How do I convert a pick rays intersection into a 3D World Space (x,y,z) coordinate??"
All tutorials and examples that ive found are covering on the Mesh-Class, but i create the landscape-mesh on the fly in an array...
Im grateful for every answer and suggestion...
And a big sorry for my bad english-grammar...