Godot version
4.0 beta10
System information
MacOS 12.6
Issue description
The Vector2 operator * (Transform2D right) gives a similar (but not the same) result to Transform2D.inverse() * Vector2 instead of Transform2D.affinity_inverse() * Vector2. As a result doing Vector2 * Transform2D is not the inverse of doing Transform2D * Vector2.
Transform2D.inverse() does not take in consideration the scale of the transform, Transform2D.affinity_inverse() takes into consideration the scale. The confusion between those two functions is also mentioned here.
Steps to reproduce
Self contained code bellow.
Minimal reproduction project
var xform = Transform2D(PI/2, Vector2(2, 2), 0, Vector2(16, 16))
var from = Vector2(1, 1)
var to = xform * from
var inverse = to * xform
prints(from, inverse) # (1, 1) (4, 4)
to = xform * from
inverse = xform.inverse() * to
prints(from, inverse) # (1, 1) (4.000002, 3.999998)
to = xform * from
inverse = xform.affine_inverse() * to
prints(from, inverse) # (1, 1) (1, 1)