Use builtin Vector2 functions for calculation of angles.
.
This commit is contained in:
parent
c97afc033f
commit
a1f616dcfc
8 changed files with 11 additions and 11 deletions
|
|
@ -271,7 +271,7 @@ Transform2D Transform2D::interpolate_with(const Transform2D &p_transform, real_t
|
|||
}
|
||||
|
||||
//construct matrix
|
||||
Transform2D res(Math::atan2(v.y, v.x), p1.lerp(p2, p_c));
|
||||
Transform2D res(v.angle(), p1.lerp(p2, p_c));
|
||||
res.scale_basis(s1.lerp(s2, p_c));
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue