Skip to main content
gamedev.net
🔒 Locked

isometric perspective

Started by Hauptman May 4, 2004 at 12:14 PM 1 replies 350+ views
Original Post
Hauptman
Hauptman
Hi! I want to make a isometric perspective in a 3D world. So I thought about transforming my world matrix. ok. I read some articles on isometric perspective here von gd.net, but these things weren''t able to help me. So, I just want to make a world transformation to have an isometric perspective. Can somebody explain me the principle of such a transform or could somebody help me with some code Ciao, _ scio me nihil scire Ceterum censeo, carthaginem delendam esse
Hope is the first step on the road of disappointment
Supernat02
Supernat02
I like this website's explanation. http://www.angelcode.com/dev/worldview/worldview.asp

I think it's the view projection that you'll want to look at, i.e. where the camera is in the world. A simple example of code to place the camera at a point, looking at another point is:

UpDirection = D3DXVECTOR3(0.0f, 1.0f, 0.0f);

EyePoint.x = LookAtPoint.x + sinf(YRotation)*ZDistance*ZoomPercentage;
EyePoint.y = PlaneDistance*ZoomPercentage;
EyePoint.z = LookAtPoint.z + cosf(YRotation)*ZDistance*ZoomPercentage;

CloseUpPoint.x = LookAtPoint.x + sinf(YRotation-0.03f)*ZDistance*0.90f*FZoomPercentage;
CloseUpPoint.y = (FPlaneDistance*0.90f*ZoomPercentage);
CloseUpPoint.z = LookAtPoint.z + cosf(YRotation-0.03f)*ZDistance*0.90f*ZoomPercentage;

// Create the Matrix

D3DXMatrixLookAtLH(&ViewMatrix, &EyePoint, &LookAtPoint, &UpDirection);


You would then set your transform as such:
D3DDevice->SetTransform(D3DTS_VIEW, ViewMatrix);

This code comes from my engine. Changing the various parameters allows freedom to rotate the camera around the LookAtPoint, at a certain height and distance from that point.

Chris

[edited by - Supernat02 on May 4, 2004 12:22:40 AM]
Chris ByersMicrosoft DirectX MVP - 2005

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.