From 6249ebb9c80b342d7adf3d8241dea7da4db71dc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gilles=20Roudi=C3=A8re?= Date: Thu, 18 Mar 2021 15:01:30 +0100 Subject: [PATCH] Make 2D navigation consider scale --- servers/navigation_server_2d.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/servers/navigation_server_2d.cpp b/servers/navigation_server_2d.cpp index 7e579c36f49..9e32bc209bc 100644 --- a/servers/navigation_server_2d.cpp +++ b/servers/navigation_server_2d.cpp @@ -132,7 +132,8 @@ static Vector vector_v3_to_v2(const Vector &d) { static Transform trf2_to_trf3(const Transform2D &d) { Vector3 o(v2_to_v3(d.get_origin())); 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); }