diff options
author | Yaohua Xiong <xiongyaohua@gmail.com> | 2022-12-06 20:45:17 +0800 |
---|---|---|
committer | Yaohua Xiong <xiongyaohua@gmail.com> | 2022-12-06 20:45:17 +0800 |
commit | 322dbd095563cef09bebcaca3e6c6ea797fee367 (patch) | |
tree | f1af9cd1a1bfd94138e060dc87e6059daeea2ce3 /scene | |
parent | 43e9ca40ff9a87655249e372654e2d30223363f7 (diff) |
Fix Path2D fish bone direction
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/path_2d.cpp | 2 | ||||
-rw-r--r-- | scene/resources/curve.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index 3876ab128c..823b8d56e3 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -120,7 +120,7 @@ void Path2D::_notification(int p_what) { Transform2D *w = frames.ptrw(); for (int i = 0; i < sample_count; i++) { - w[i] = curve->sample_baked_with_rotation(i * interval, true); + w[i] = curve->sample_baked_with_rotation(i * interval, false); } } diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp index fa7a1f3dbf..bc2149a8c6 100644 --- a/scene/resources/curve.cpp +++ b/scene/resources/curve.cpp @@ -941,7 +941,7 @@ Transform2D Curve2D::_sample_posture(Interval p_interval) const { const Vector2 forward = forward_begin.slerp(forward_end, frac).normalized(); const Vector2 side = Vector2(-forward.y, forward.x); - return Transform2D(forward, side, Vector2(0.0, 0.0)); + return Transform2D(side, forward, Vector2(0.0, 0.0)); } Vector2 Curve2D::sample_baked(real_t p_offset, bool p_cubic) const { |