Sign in to follow this  
mosweg

Triangle vertices don´t move equally

Recommended Posts

mosweg    131
I´m using C++ and DirectX 9

I´ve created a triangle whit 3 vertices

(0,0,0)
(0,10,50)
(10,0,0)

When I move the triangle whit
[code]
3DXMATRIX matTranslateA;
x-=0.5f;
D3DXMatrixTranslation(&matTranslateA, x, y, z);
d3ddev->SetTransform(D3DTS_WORLD, &matTranslateA);
[/code]
The triangle moves to the left. But the vertex whit the z=50 moves slower than the other 2 vertices resulting in a rotation...
How can I make sure the whole triangle moves equally?

Share this post


Link to post
Share on other sites
Maddius    146
B_old is right if you set that 50 to 0 im sure they would all move equally. Imagine it as if you were looking at some distant hills and you have a tree a few feet in front of you, if you moved to the side the tree would quickly move out of view but the hills would still be in view.

Share this post


Link to post
Share on other sites
mosweg    131
Your right,

From the camera view it really looks like the position changed.
But I took a pair of scissors and I saw the same effect as whit the triangle.
Funny how some things in real life goes whiteout thinking
But as soon as it happens in a 3D program it seems like something is wrong.
I was worried the actual position of the vertices where wrong what would result in a strange object

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this