diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-03-18 15:42:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-18 15:42:46 +0100 |
commit | 2fd445cc18dd4cf0d65a511f9d714763f74a3e20 (patch) | |
tree | d8046f33951307eff0d09c1df3c58296f6532cbc /servers | |
parent | c097ce0c1843f71271b8af9a1291602b1aab7df6 (diff) | |
parent | 6249ebb9c80b342d7adf3d8241dea7da4db71dc1 (diff) |
Merge pull request #47133 from groud/navigation_2d_bugfix
Make 2D navigation consider scale
Diffstat (limited to 'servers')
-rw-r--r-- | servers/navigation_server_2d.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/servers/navigation_server_2d.cpp b/servers/navigation_server_2d.cpp index 7e579c36f4..9e32bc209b 100644 --- a/servers/navigation_server_2d.cpp +++ b/servers/navigation_server_2d.cpp @@ -132,7 +132,8 @@ static Vector<Vector2> vector_v3_to_v2(const Vector<Vector3> &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); } |