diff options
Diffstat (limited to 'scene/animation')
-rw-r--r-- | scene/animation/animation_blend_space_2d.cpp | 10 | ||||
-rw-r--r-- | scene/animation/animation_player.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/scene/animation/animation_blend_space_2d.cpp b/scene/animation/animation_blend_space_2d.cpp index 003a4fad90..5a42e2af7a 100644 --- a/scene/animation/animation_blend_space_2d.cpp +++ b/scene/animation/animation_blend_space_2d.cpp @@ -30,7 +30,7 @@ #include "animation_blend_space_2d.h" -#include "core/math/delaunay_2d.h" +#include "core/math/geometry_2d.h" void AnimationNodeBlendSpace2D::get_parameter_list(List<PropertyInfo> *r_list) const { r_list->push_back(PropertyInfo(Variant::VECTOR2, blend_position)); @@ -366,7 +366,7 @@ Vector2 AnimationNodeBlendSpace2D::get_closest_point(const Vector2 &p_point) { points[j] = get_blend_point_position(get_triangle_point(i, j)); } - if (Geometry::is_point_in_triangle(p_point, points[0], points[1], points[2])) { + if (Geometry2D::is_point_in_triangle(p_point, points[0], points[1], points[2])) { return p_point; } @@ -375,7 +375,7 @@ Vector2 AnimationNodeBlendSpace2D::get_closest_point(const Vector2 &p_point) { points[j], points[(j + 1) % 3] }; - Vector2 closest = Geometry::get_closest_point_to_segment_2d(p_point, s); + Vector2 closest = Geometry2D::get_closest_point_to_segment(p_point, s); if (first || closest.distance_to(p_point) < best_point.distance_to(p_point)) { best_point = closest; first = false; @@ -455,7 +455,7 @@ float AnimationNodeBlendSpace2D::process(float p_time, bool p_seek) { points[j] = get_blend_point_position(get_triangle_point(i, j)); } - if (Geometry::is_point_in_triangle(blend_pos, points[0], points[1], points[2])) { + if (Geometry2D::is_point_in_triangle(blend_pos, points[0], points[1], points[2])) { blend_triangle = i; _blend_triangle(blend_pos, points, blend_weights); break; @@ -466,7 +466,7 @@ float AnimationNodeBlendSpace2D::process(float p_time, bool p_seek) { points[j], points[(j + 1) % 3] }; - Vector2 closest2 = Geometry::get_closest_point_to_segment_2d(blend_pos, s); + Vector2 closest2 = Geometry2D::get_closest_point_to_segment(blend_pos, s); if (first || closest2.distance_to(blend_pos) < best_point.distance_to(blend_pos)) { best_point = closest2; blend_triangle = i; diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 4e56f1acf0..319d0171b3 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -396,7 +396,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, float Animation::UpdateMode update_mode = a->value_track_get_update_mode(i); if (update_mode == Animation::UPDATE_CAPTURE) { - if (p_started) { + if (p_started || pa->capture == Variant()) { pa->capture = pa->object->get_indexed(pa->subpath); } |