Draven Posted October 10, 2005 Posted October 10, 2005 Hi Guys, i'm actually working on a D3D9 Project... who's wondering? :rolleyes: I admit that this is my first project in DirectX, so i have a lot of questions for y'all. But first of all, i'll give you some information about the project. So, it's a kind of 3D-Mapviewer for the Game "Anno 1503" alias knows as "1503 A.D."! Here's 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. 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 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 can't get it working and i can't find a really good tutorial or example for this stuff... :( And my last question for the moment is: "How do I convert a pick ray's intersection into a 3D World Space (x,y,z) coordinate??" All tutorials and examples that i've found are covering on the Mesh-Class, but i create the landscape-mesh on the fly in an array... I'm grateful for every answer and suggestion... :D And a big sorry for my bad english-grammar... :o Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.