I fixed it! Instead of the Matrix.RotationYawPitchRoll()
method I used Matrix.RotationX
and Matrix.RotationY
. Here is the code:
_game._device.Transform.World = Matrix.RotationX(_rotationValues(i).X) * Matrix.RotationY(_rotationValues(i).Y) * Matrix.Translation(_translationValues(i) + location)
_game._device.DrawPrimitives(PrimitiveType.TriangleList, 0, 4)
_game._device.Transform.World = Matrix.Identity