I am using DirectXTK for C++, and am making heavy use of the sprite batch function.
I am trying to develop an isometric rendering engine. I've already gotten the isometric rendering to work properly. Along with offsetting. However I run into one major problem.
I can't for the life of me figure out how to center the camera's center to the world's (0,0) or any other coord.
And after injecting this transformation matrix generated directly from the camera into SpriteBatch.Begin()
Matrix Camera::getTransformMatrix() {
Matrix Transform = Transform.CreateTranslation(Vector3(World_Pos.x, World_Pos.y, 0));
Matrix Rotation = Rotation.CreateRotationZ(0);
Matrix Scale = Scale.CreateScale(ZoomFactor, ZoomFactor, 1);
return Transform * Rotation * Scale;
}
Nothing seems to happen. This is with the Camera's world position set to (0,0) and the sprite's world position set to (0,0).
This is the resulting image.
https://i.stack.imgur.com/STyqO.png
I turned off alpha blending, and sprite offsets for debugging reasons.
Can anyone help me please? Also, if anyone can tell me how to flip the y that would be great as well.