Inverse Matrix in the Demo does not work when scaling
Unreal852 opened this issue · comments
Unreal commented
Hi, i used the Matrix3 provided in the Demo but when scaling it, the inverse matrix does not work, or maybe i'm doing it wrong . Here is how i update my matrix
Matrix.LoadIdentity();
Matrix.Scale(ViewZoom, ViewZoom);
Matrix.Translate(ViewPosition.X, ViewPosition.Y);
InverseMatrix.CopyFrom(Matrix).Inverse();
Jingwood commented
Yes I can confirm the bug, let me fix it...
Drew Noakes commented
Could potentially use System.Numerics.Vectors
instead.
Jingwood commented
Added the scale feature, as well as new feature for drag-to-move.
Thanks, @drewnoakes! I haven't noticed there is a built-in numeric library. Now It has been changed to use the System.Numeric.*
instead.