Fix translate matrix creation.

This commit is contained in:
Egon Elbre 2018-03-07 17:43:11 +02:00
parent 6061e72ea7
commit a065e4965d

View file

@ -526,10 +526,10 @@ func MatrixSubtract(left, right raylib.Matrix) raylib.Matrix {
// MatrixTranslate - Returns translation matrix
func MatrixTranslate(x, y, z float32) raylib.Matrix {
return raylib.NewMatrix(
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
x, y, z, 1.0)
1.0, 0.0, 0.0, x,
0.0, 1.0, 0.0, y,
0.0, 0.0, 1.0, z,
0, 0, 0, 1.0)
}
// MatrixRotate - Returns rotation matrix for an angle around an specified axis (angle in radians)