Hi Guys,
I am experiencing a weird problem when I locate an object in 3D space in DirectX 11.
If I perform a single translation on an object it locates nicely, but when I add another translation to it. the object then becomes distorted.
DirectX::XMMATRIX translate;
DirectX::XMMATRIX matObject = DirectX::XMMatrixTranspose(DirectX::XMMatrixIdentity());
translate = DirectX::XMMatrixTranslation(0, 0.5, 0);
matObject = DirectX::XMMatrixTranspose(DirectX::XMMatrixMultiply(matObject, translate));
// translate = DirectX::XMMatrixTranslation(0, -0.5, 0);
// matObject = DirectX::XMMatrixTranspose(DirectX::XMMatrixMultiply(matObject, translate));
char objectData[sizeof(DirectX::XMMATRIX)];
memcpy(objectData, &matObject, sizeof(DirectX::XMMATRIX));
d3dContext->UpdateSubresource(d3dConstantBufferObject, 0, 0, objectData, 0, 0);
d3dContext->VSSetConstantBuffers(1, 1, &d3dConstantBufferObject);With the uncommented area the object looks like this, which is as expected.

But If I uncomment the lines in the middle there, I would expect to have the cube move back to its original position of (0, 0, 0). But instead, I get a distorted cube as shown below.

Leaving the cube at (0, 0, 0) and performing no translations at all renders fine as well, as would be expected.
I'm presently at a loss as to why this is happening.
Any thoughts would be greatly appreciated.