Make 2D navigation consider scale

This commit is contained in:
Gilles Roudière 2021-03-18 15:01:30 +01:00
parent 08ca4184f4
commit 6249ebb9c8
1 changed files with 2 additions and 1 deletions

View File

@ -132,7 +132,8 @@ static Vector<Vector2> vector_v3_to_v2(const Vector<Vector3> &d) {
static Transform trf2_to_trf3(const Transform2D &d) { static Transform trf2_to_trf3(const Transform2D &d) {
Vector3 o(v2_to_v3(d.get_origin())); Vector3 o(v2_to_v3(d.get_origin()));
Basis b; Basis b;
b.rotate(Vector3(0, 1, 0), d.get_rotation()); b.rotate(Vector3(0, -1, 0), d.get_rotation());
b.scale(v2_to_v3(d.get_scale()));
return Transform(b, o); return Transform(b, o);
} }