2D Animation Improvements

-=-=-=-=-=-=-=-=-=--=-=-=

-Ability to set 2D nodes as bones
-Abity to set 2D nodes as IK chains
-2D IK Solver
-Improvements in the UI for adding keyframes (separate loc,rot,scale buttons)
This commit is contained in:
Juan Linietsky
2014-07-06 11:49:27 -03:00
parent cd80d442a2
commit 3d68949a1c
22 changed files with 1725 additions and 388 deletions

View File

@@ -74,7 +74,7 @@ float Vector2::distance_squared_to(const Vector2& p_vector2) const {
float Vector2::angle_to(const Vector2& p_vector2) const {
return Math::atan2( x-p_vector2.x, y - p_vector2.y );
return Math::atan2( tangent().dot(p_vector2), dot(p_vector2) );
}
float Vector2::dot(const Vector2& p_other) const {
@@ -594,6 +594,10 @@ Matrix32 Matrix32::rotated(float p_phi) const {
}
float Matrix32::basis_determinant() const {
return elements[0].x * elements[1].y - elements[0].y * elements[1].x;
}
Matrix32 Matrix32::interpolate_with(const Matrix32& p_transform, float p_c) const {